SELECT SUM(Tot) AS Tot, SUM(Late) AS Late
FROM (SELECT 1 AS Tot, (time NOT LIKE '%:00') AS Late
FROM messages
WHERE date = DATE('now')
)
On 2018/08/29 5:56 PM, Cecil Westerhof wrote:
I have a table messages in which something is put every minute. The total
messages that are added today I can get with:
SELECT COUNT(*) AS Total
FROM messages
WHERE date = DATE('now')
And the number of messages that where entered today, but not at the start
of a minute I can get with:
SELECT COUNT(*) AS Late
FROM messages
WHERE date = DATE('now')
AND time NOT LIKE '%:00'
Is there a way to get this information in one query?
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users