On 3/13/2019 8:08 PM, Bart Smissaert wrote:
But I would like the result to be in 3 columns, so result in this case
would be:

Place Not_Attended All
-------------------------------
A       3                      7
B       2                      3

Something like this (not tested):

select PLACE,
  sum(ID not in (select ID from ATTENDED)) Not_Attended,
  count(*) All
from PERSONS group by PLACE;

--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to