Skip to content
Advertisement

Tag: closest

Oracle SQL closest date to given date

i have a table with a column for categories, date and price. Like this: So there are (almost) always two dates per group with two different prices. Now i need to write an SQL Statement to get the closest date per group to a given date(f.e. 05.05.2019). Group 1 has two dates an the SQL statement needs to Select one

Advertisement