![JAR search and dependency download from the Maven repository](/logo.png)
g1401_1500.s1407_top_travellers.script.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leetcode-in-kotlin Show documentation
Show all versions of leetcode-in-kotlin Show documentation
Kotlin-based LeetCode algorithm problem solutions, regularly updated
# Write your MySQL query statement below
# #Easy #LeetCode_Curated_SQL_70 #Database #SQL_I_Day_9_Control_of_Flow
# #2023_10_02_Time_1394_ms_(98.43%)_Space_0B_(100.00%)
select u.name,IFNULL(sum(r.distance), 0) as travelled_distance
from Users u left join Rides r
on u.id = r.user_id
group by u.id
order by travelled_distance desc,name asc
© 2015 - 2025 Weber Informatics LLC | Privacy Policy