Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Taking values from other rows matching by date

Language: Layout:
View schema
Execution time: 0,17 sec, rows selected: 11, rows affected: 8, absolute service time: 0,31 sec 
edit mode |  history
   store_id index_id start_date end_date gross_sales_price net_sales_price
1 1 22 2014-08-30 00:00:00.000 2014-10-31 23:59:59.000 39,99 28
2 1 22 2014-11-01 00:00:00.000 2016-09-30 23:59:59.000 20,99 15
3 3 22 2014-11-01 00:00:00.000 2014-12-31 23:59:59.000 20,99 15
4 3 22 2014-10-01 00:00:00.000 2014-10-31 23:59:59.000 39,99 28
5 3 22 2014-08-01 00:00:00.000 2014-09-30 23:59:59.000 29,99 25
6 3 22 2015-01-01 00:00:00.000 2015-09-30 23:59:59.000 39,99 28
7 4 22 2016-01-01 00:00:00.000 2016-07-31 23:59:59.000 29,99 25
8 4 22 2017-01-01 00:00:00.000 2018-09-30 23:59:59.000 39,99 28
9 4 22 2016-10-01 00:00:00.000 2016-12-31 23:59:59.000 NULL NULL
10 4 22 2016-08-01 00:00:00.000 2016-09-30 23:59:59.000 20,99 15

    
                
λ
.NET NoSQL database for rapid development