题目
Table: Users
1 | +---------------+---------+ |
Table: Rides
1 | +---------------+---------+ |
Write an SQL query to report the distance travelled by each user.
Return the result table ordered by travelled_distance in descending order, if two or more users travelled the same distance, order them by their name in ascending order.
The query result format is in the following example.
Example 1:
1 | Users table: |
解法
解法一:
SQL
1 | # Write your MySQL query statement below |