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
)
Related Contents:
- 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)
- Syntax error when using except in a query
- SQL Query to get column values that correspond with MAX value of another column?
- SELECT query return 1 row from each group
- Checking multiple columns for one value
- MySQL INNER JOIN select only one row from second table
- MySQL – How to search for exact word match using LIKE?
- MySQL #1093 – You can’t specify target table ‘giveaways’ for update in FROM clause
- SQL query to check if a name begins and ends with a vowel
- MySQL Select Query – Get only first 10 characters of a value
- MySQL INSERT INTO … VALUES and SELECT
- 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
- Retrieving the last record in each group – MySQL
- Calculate a running total in MySQL
- SELECTING with multiple WHERE conditions on same column
- Getting “Lock wait timeout exceeded; try restarting transaction” even though I’m not using a transaction
- Simulate lag function in MySQL
- Calculate Age in MySQL (InnoDb)
- Cast from VARCHAR to INT – MySQL
- Select row with most recent date per user
- difference between primary key and unique key
- Mixing ANSI 1992 JOINs and COMMAs in a query
- SQL: Creating a Relational table with 2 different auto_increment
- How do I select an entire row which has the largest ID in the table?
- How to count items in comma separated list MySQL
- Entity-Attribute-Value Table Design
- The total number of locks exceeds the lock table size
- Can I reuse a calculated field in a SELECT query?
- MySQL create stored procedure syntax with delimiter
- MySQL : transaction within a stored procedure
- Deleting duplicate rows from a table
- Determine Rank based on Multiple Columns in MySQL
- Cast int to varchar
- View’s SELECT contains a subquery in the FROM clause
- Alternative to using LIMIT keyword in a SubQuery in MYSQL
- mysql trigger stored trigger is already used by statement which invoked stored trigger
- How does MySQL’s ORDER BY RAND() work?
- MySQL combine two columns and add into a new column
- Calculating time difference between 2 dates in minutes
- Return a default value if single row is not found
- How to get multiple records against one record based on relation?
- sql like operator on integer
- MySQL – SELECT all columns WHERE one column is DISTINCT