casbboy — 2013-12-26T18:41:47-05:00 — #1
Here is the mysql query I'm using to see which rows in our "tags" table have no matching row in our "taginfo" table.
Now, I want to take this query a step further. I'm hoping to select not only the rows in the "tags" table where the "snub" column has no match, but I want to select the rows that only occur once. For instance:
list of "snub" variables in the "tags" table
So, in this case, it would select rows with comedy and foreign as the snub, since they only appear once.
I can't figure out how to achieve this. (my final goal is to delete all rows that have single instance not matching).
All feedback appreciated!
blue_sky2 — 2013-12-26T21:05:54-05:00 — #2
You can do it like this,for example:
SELECT * FROM
tags GROUP BY
snub HAVING COUNT(
casbboy — 2013-12-26T21:57:40-05:00 — #3
I know that query and have been trying to apply that to the multi-table one above, but without success.
casbboy — 2013-12-26T21:59:32-05:00 — #4
Actually, that combo worked. I thought I already attempted this, but it worked this time around:
snub ) =1
LIMIT 0 , 30