Created
October 6, 2018 00:52
-
-
Save andikasputra/b1c65c18524b35fc358b3769273872d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT level, COUNT(id) AS jml | |
FROM soal | |
GROUP BY level; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
SUM(CASE WHEN level = 'mudah' THEN 1 ELSE 0 END) AS mudah, | |
SUM(CASE WHEN level = 'sedang' THEN 1 ELSE 0 END) AS sedang, | |
SUM(CASE WHEN level = 'sulit' THEN 1 ELSE 0 END) AS sulit | |
FROM soal; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment