Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/dos_counts.sql Secret

Created Nov 22, 2020
Embed
What would you like to do?
select employee_id,
sum(case when status = 'presence' then 1 else 0 end) as presence_count,
sum(case when status = 'absence' then 1 else 0 end) as absence_count
from employee_attendance
group by employee_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.