I have a table where each row contains a boolean and a foreign key to another trecord in another table.
I want to know how many distinct foreign keys have false as the boolean - something like this:
SELECT COUNT(
SELECT DISTINCT Table.RecordID
FROM Table
WHERE Table.Bool = 0)
AS UniqueRecordCount
how would i achieve this?
cheers
monkey