I have two tables:
works I need to return values from the links table, but first I need to see if it exists in the works table, and if it exists it must have been inserted more than 24h, otherwise this record can not be returned in the query. >
Querying and returning only what I do not have in the works table is easy, I do so:
SELECT *
FROM links l
WHERE NOT EXISTS
(
SELECT *
FROM works w
WHERE w.linkId = l.linkId
)
But I need to return only records entered more than 24h