This is an oddity. I have an empty SQLite DB.
When I execute select min(time) from asdftable I get a blank row back. When I execute select time from asdftable I get nothing back (which is proper).
Any ideas why this is?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Aggregate functions all return something even if nothing is found, simply because they are implicitly grouping all (any) rows in your table to get you an aggregate value. Take
countfor example:nullis tominas0is tocountwhere no rows are returned.This can be a useful property. Consider the following example:
If you want to filter this case so no records are returned, you can use a having clause (and make the grouping explicit):