Given the table foo
:
Num Letter
If I do SELECT * GROUP BY Num
, of course I get something like this:
Num Letter
What I would like to clarify is:
Num Has_No_Letter_C --------------------- 1 Yes 2 No 3 No
There is probably a simple SELECT IF ()
plus a ORDER BY
, but I don't see it right now ...
In my real example, the resulting LEFT JOIN
ed table is in another table, and I want to be able to reject No
records, but keep NULL
if my other bar
table has Num
= 4 rows.
source share