Skip to content

Commit 837013e

Browse files
authored
Create sort-the-olympic-table.sql
1 parent 86b38cd commit 837013e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

MySQL/sort-the-olympic-table.sql

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Time: O(nlogn)
2+
# Space: O(n)
3+
4+
SELECT country, gold_medals, silver_medals, bronze_medals
5+
FROM Olympic
6+
ORDER BY gold_medals DESC, silver_medals DESC, bronze_medals DESC, country ASC;

0 commit comments

Comments
 (0)