By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
SELECT t1.userid,t1.attribute_name,t1.value_date_time FROM table_name t1, (SELECT t2.userid,t2.attribute_name, MAX(t2.value_date_time) as max_time FROM table_name) t2 WHERE t1.userid=t2.userid AND t1.attribute_name=t2.attribute_name AND t1.value_date_time = t2.max_time;
Dig Deeper on Oracle and SQL
Related Q&A from Brian Peasland
Oracle expert Brian Peasland answers one reader's question about common pitfalls when connecting Oracle to outside programs.continue reading
One reader asks expert Brian Peasland a question about datafile sizes with the Oracle RMAN duplicate 10g command.continue reading
Managing parent table-child table relations in Oracle SQL environments is key to efficient programming.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.