I have a SQL db with several million triples stored. A large portion of the triples are repeated at least once. What is the most practical way to count the number of times that every triple occurs in the db? Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Supposing that the “triple” is made up of three columns
c1,c2, andc3, you can usegroup byto count the distinct tuples:Demo: http://www.sqlfiddle.com/#!7/693c4/2