Hello, due to the wonderful help that I have recieved before, I dare to ask
"I have records in a database with Category and Subcategory fields. How
would I formulate the query to return distinct results and return for
whatever I need to do with them?"

There may be thousands of category and subcategory duplications as they are
not the primary record identifier.

I.e. A record has a category of "Manuals" and a subcategory "Audio"
      Another record has a category of "Manuals" and a subcategory "Phone"
      A record has a category of "Receipts" and a subcategory "Water"
      A record has a category of "Receipts" and a subcategory "Gas"
      A record has a category of "Receipts" and a subcategory "Electricityr"

So they would look like:

Manuals
  + Audio
  + Phone
Receipts
 + Water
 + Gas
 + Electricity

The below doesn't work as I am unfamiliar with these sorts of queries.

"SELECT DISTINCT category from documents [SELECT DISTINCT IN subcategory
FROM documents]"
-- 
View this message in context: 
http://www.nabble.com/Extracting-distinct-category-and-subcategory-pairs-tp17734716p17734716.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to