SQL. Conditional expression with count()

example

select 
  count(case when name = 'name1' then 1 else null end) as countName1,
  count(case when name = 'name2' then 1 else null end) as countName2
from company.employee;
This entry was posted in Без рубрики. Bookmark the permalink.