How about using GROUP BY?
SELECT foo,bar FROM my_table GROUP BY foo,bar
More Related Contents:
- how to delete data from table A besides the customer service and director data in table B?
- SQL split values to multiple rows
- Get records with max value for each group of grouped SQL results
- How to populate a table with a range of dates?
- MYSQL OR vs IN performance
- ERROR 1452: Cannot add or update a child row: a foreign key constraint fails
- MySQL Cannot Add Foreign Key Constraint
- Grouping into interval of 5 minutes within a time range
- How to find gaps in sequential numbering in mysql?
- Convert timestamp to date in MySQL query
- Update a column value, replacing part of a string
- MySQL: View with Subquery in the FROM Clause Limitation
- MySql export schema without data
- mysql dynamic query in stored procedure
- MySQL combine two columns into one column
- MySQL Insert Into from one Database in another
- MySQL: LIMIT by a percentage of the amount of records?
- limiting the rows to where the sum a column equals a certain value in MySQL
- MySQL multiple columns in IN clause
- MySQL Inner Join Query Multiple Tables
- How to select one row randomly taking into account a weight?
- How to select column names dynamically in mySQL
- Select a column with a keyword name
- MySQL Stored Procedures not working with SELECT (basic question)
- ERROR 1148: The used command is not allowed with this MySQL version
- Use Composite Primary Key as Foreign Key
- MySQL Select minimum/maximum among two (or more) given values
- How to select data where a field has a min value in MySQL?
- How do you force mysql LIKE to be case sensitive? [duplicate]
- In what order are MySQL JOINs evaluated?