This should do it:
SELECT report_id, computer_id, date_entered
FROM reports AS a
WHERE date_entered = (
SELECT MAX(date_entered)
FROM reports AS b
WHERE a.report_id = b.report_id
AND a.computer_id = b.computer_id
)
More Related Contents:
- Recreating a query using INNER JOIN? [duplicate]
- What is better subquery vs literal on IN clause in mysql
- Calculate Average of the largest values in multiple columns
- How can I SELECT rows with MAX(Column value), PARTITION by another column in MYSQL?
- SQL query return data from multiple tables
- quick selection of a random row from a large table in mysql
- MySQL SELECT only not null values
- Ordering by specific field value first
- SELECT / GROUP BY – segments of time (10 seconds, 30 seconds, etc)
- SQL Query to get column values that correspond with MAX value of another column?
- Checking multiple columns for one value
- MySQL #1093 – You can’t specify target table ‘giveaways’ for update in FROM clause
- MySQL INSERT INTO … VALUES and SELECT
- MySQL error 1241: Operand should contain 1 column(s)
- How to select one row randomly taking into account a weight?
- quick selection of a random row from a large table in mysql
- Compare only day and month with date field in mysql
- Syntax error when using except in a query
- SELECT query return 1 row from each group
- MySQL INNER JOIN select only one row from second table
- MySQL Select Query – Get only first 10 characters of a value
- SQL query to check if a name begins and ends with a vowel
- Deleting a row based on the max value
- 1052: Column ‘id’ in field list is ambiguous
- Cumulative sum over a set of rows in mysql
- Set NOW() as Default Value for datetime datatype?
- Add Auto-Increment ID to existing table?
- MySQL SELECT DISTINCT multiple columns
- SQL DELETE with JOIN another table for WHERE condition
- How do I get the first day of the week of a date in mysql?