I need this:
product_id | domain_id
1 | 0
1 | 3
2 | 0
2 | 3
3 | 0
I want to select all product_ids that have the domain_id 3 (this is "my domain id", can be X, but it is not necessarily the highest) domain_id here, but if there is no row that has domain_id 3 and that product_id, i want to select the row that has the product_id and domain_id 0.. so from the table i have above i would select product_ids, domain_ids where domain_id is 3 or 0 if 3 doesn't exist for that product_id:
product_id | domain_id
1 | 3
2 | 3
3 | 0
thanks
product_id | domain_id
1 | 0
1 | 3
2 | 0
2 | 3
3 | 0
I want to select all product_ids that have the domain_id 3 (this is "my domain id", can be X, but it is not necessarily the highest) domain_id here, but if there is no row that has domain_id 3 and that product_id, i want to select the row that has the product_id and domain_id 0.. so from the table i have above i would select product_ids, domain_ids where domain_id is 3 or 0 if 3 doesn't exist for that product_id:
product_id | domain_id
1 | 3
2 | 3
3 | 0
thanks