1

Hey in SSMS I have this query:

SELECT MessageID
,MessageName
,DateTimeStamp
FROM faa_source_cleansed.message_meta_data

and have data in it like this:

MessageID MessageName DateTimeStamp
MS_2srpuI0UBZC0yMe Proxy_TEST 2023-02-06 14:10:16.570
MS_2srpuI0UBZC0yMe Proxy_TEST 2023-02-06 14:17:40.517
MS_3DIRR1wBVXPrdlQ Proxy_TEST 2023-02-06 14:17:40.517
MS_2srpuI0UBZC0yMe Proxy_TEST 2023-02-06 14:29:55.527
MS_3DIRR1wBVXPrdlQ Proxy_TEST 2023-02-06 14:29:55.527
MS_dpbKrzgBsXgVpTE Proxy_TEST 2023-02-06 14:29:55.527

I want to delete the rows where timestamp is greater than the smallest one.

So the result should be like this:

MessageID MessageName DateTimeStamp
MS_2srpuI0UBZC0yMe Proxy_TEST 2023-02-06 14:10:16.570
MS_3DIRR1wBVXPrdlQ Proxy_TEST 2023-02-06 14:17:40.517
MS_dpbKrzgBsXgVpTE Proxy_TEST 2023-02-06 14:29:55.527

0 Answers0