SQL grouping query question; evaluating a group of rows based on the value of one field.
- by user324575
I've got table vendorparts that lists all my parts and their vendor(s). Parts with multiple vendors have multiple records in this table. I'm trying to write a query that only returns the partid, and vendor of parts that do not have a default vendor assigned.
Partid Vendor Defaultflag
1 A 1
2 B 0
2 …