S
S
shellnet2021-06-28 12:10:22
Oracle
shellnet, 2021-06-28 12:10:22

How to determine the closest date to the current date in Oracle SQL?

How to display prices that are closest to the current date in SQL?
Columns of a similar kind
60d991821865d656324634.png
For part of this question, the answers were given in the comments
*************************************** ******************************************************* ******************************** I
formulate in more detail It is
required to display prices for each product category that are closest to the current one
60d9aee796a5a913031643.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Akina, 2021-06-28
@warlinx

SELECT *
FROM tablename
WHERE datecolumn <= CURRENT_DATE
ORDER BY datecolumn DESC 
FETCH FIRST 1 ROWS WITH TIES

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question