OK, have a DB with 2.2 million rows, and 5 fields, let's call them a, b, c, d and url.
a, b, c, & d are just integers corresponding to an id in another table. url is a text field.
Basically what we want to do is find all the of unique urls, ie every url that appears only once.
so we have
"SELECT url, COUNT(*) FROM result GROUP BY url"
Works fine. But we only want those results where the COUNT(*) row contains one. Is it either possible to only return these rows, or if not, sort the COUNT(*) row in ascending order (ie all the 1's first).
I'm assuming it's also possible to be more specific in this Query, ie
"SELECT b, c, url, COUNT(*) FROM result GROUP BY url WHERE b=x AND c=y"?