Skip to content

Instantly share code, notes, and snippets.

@webgyo
Created July 8, 2021 03:00
Show Gist options
  • Save webgyo/b6d062c36281face49694e7e7dd4cadb to your computer and use it in GitHub Desktop.
Save webgyo/b6d062c36281face49694e7e7dd4cadb to your computer and use it in GitHub Desktop.
SQLコマンドメモ #sql
SELECT word,SUM(search_count) AS total FROM search_words GROUP BY word;


SELECT word,SUM(search_count) AS total FROM search_words GROUP BY word ORDER BY total DESC;


SELECT word,SUM(search_count) AS total FROM search_words where word LIKE '%AAA%' GROUP BY word ORDER BY total DESC, word ASC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment