+ 8
Dynamic hotel rates
I have table of rates with columns [check-in, check-out, price] 2021-05-12 2021-05-18 30$ 2021-05-19 2021-05-23 35$ now if clients search for date range 2021-05-15 to 2021-05-22 rate must be calculated from two rows 3 days from first row and 4 from second need the query for dynamic rates changes
6 Respostas
+ 5
SELECT TOP number|percent column_name(s)
FROM table_name
WHERE condition;
+ 5
S-Adil 👑 show me the table
+ 2
JOY it's not about that you think
clients search in date range where it exists between two rows
+ 1
if I search for date range 2021-05-12 to 2021-05-22 this row rate isn't exists it must calculated from both rows
30$
35$
0
rates table
check-in check-out price
2021-05-12 2021-05-18 30$
2021-05-19 2021-05-23 35$
0
JOY check-in and check-out is date range from - to