Skip to content

Instantly share code, notes, and snippets.

@hidayat365
Created May 19, 2012 14:54
Show Gist options
  • Save hidayat365/2731111 to your computer and use it in GitHub Desktop.
Save hidayat365/2731111 to your computer and use it in GitHub Desktop.
Summary SQL
select kelas, count(*) as jumlah
from (
select nis, max(kelas) kelas
from tabel
group by nis
) as summary
group by kelas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment