What do you want to save?
Add Code snippet
New code examples
-
SQL 2022-02-01 04:35:17
sql finding longest and shortest names in a fleld
# IN the example below, "CITY" is the filed, "STATION" is the Table (SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) ASC, CITY ASC LIMIT 1) UNION (SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) DESC, CITY DE... Add solution -
SQL 2021-09-28 01:33:04
sql select most frequent value in column
SELECT col, COUNT(col) AS value_occurrence FROM m_table GROUP BY col ORDER BY value_occurrence DESC LIMIT 1; -- Oracle <= 11g SELECT * FROM (SELECT col, COUNT(col) AS value_occurrence FROM m_table GROUP BY col ORDER BY value_occurrence DESC) WHERE row... Add solution -
SQL 2021-09-16 12:02:04
mysql select last 10 rows
SELECT fields FROM table ORDER BY id DESC LIMIT 1; Add solution -
Best helpers
Ranking is empty