How can i get closing stock balance and opening stock balance from this record using sql server
dates |
BookName |
bookcode |
qty |
category |
29-May-2021 |
INTRODUCTION TO BIOLOGY |
1 |
1 |
BIOLOGY |
29-May-2021 |
INTRODUCTION TO BIOLOGY |
2 |
1 |
BIOLOGY |
29-May-2021 |
INTRODUCTION TO BIOLOGY |
3 |
1 |
BIOLOGY |
29-May-2021 |
INTRODUCTION TO BIOLOGY |
4 |
1 |
BIOLOGY |
30-May-2021 |
INTRODUCTION TO BIOLOGY |
5 |
1 |
BIOLOGY |
31-May-2021 |
INTRODUCTION TO BIOLOGY |
6 |
1 |
BIOLOGY |
1-Jun-2021 |
INTRODUCTION TO BIOLOGY |
7 |
1 |
BIOLOGY |
2-Jun-2021 |
MK SECONDARY BIOLOGY BK 3 |
8 |
1 |
BIOLOGY |
3-Jun-2021 |
MK SECONDARY BIOLOGY BK 5 |
9 |
1 |
BIOLOGY |
4-Jun-2021 |
MK SECONDARY BIOLOGY BK 5 |
10 |
1 |
BIOLOGY |
5-Jun-2021 |
MK SECONDARY BIOLOGY BK 4 |
11 |
1 |
BIOLOGY |
6-Jun-2021 |
MK SECONDARY BIOLOGY BK 4 |
12 |
1 |
BIOLOGY |
7-Jun-2021 |
MK SECONDARY BIOLOGY BK 4 |
13 |
1 |
BIOLOGY |
8-Jun-2021 |
MK SECONDARY BIOLOGY BK 4 |
14 |
1 |
BIOLOGY |
9-Jun-2021 |
MK SECONDARY BIOLOGY BK 4 |
15 |
1 |
BIOLOGY |
10-Jun-2021 |
MK SECONDARY BIOLOGY BK 4 |
16 |
1 |
BIOLOGY |
29-May-2021 |
MK SECONDARY BIOLOGY BK 4 |
17 |
1 |
BIOLOGY |
29-May-2021 |
MK SECONDARY BIOLOGY BK 4 |
18 |
1 |
BIOLOGY |
29-May-2021 |
MK SECONDARY BIOLOGY BK 4 |
19 |
1 |
BIOLOGY |
29-May-2021 |
MK SECONDARY BIOLOGY BK 4 |
20 |
1 |
BIOLOGY |
29-May-2021 |
MK SECONDARY BIOLOGY BK 4 |
21 |
1 |
BIOLOGY |
29-May-2021 |
MK SECONDARY BIOLOGY BK 4 |
22 |
1 |
BIOLOGY |
29-May-2021 |
MK SECONDARY BIOLOGY BK 4 |
23 |
1 |
BIOLOGY |
1-Jun-2021 |
NCDC: PHYSICS TEXTBOOK SENIOR ONE LOWER SECONDARY CURRICULUM |
24 |
1 |
PHYSICS |
1-Jun-2021 |
NCDC: PHYSICS TEXTBOOK SENIOR ONE LOWER SECONDARY CURRICULUM |
27 |
1 |
PHYSICS |
1-Jun-2021 |
NCDC: PHYSICS TEXTBOOK SENIOR ONE LOWER SECONDARY CURRICULUM |
31 |
1 |
PHYSICS |
1-Jun-2021 |
NCDC: PHYSICS TEXTBOOK SENIOR ONE LOWER SECONDARY CURRICULUM |
36 |
1 |
PHYSICS |
1-Jun-2021 |
NCDC: PHYSICS TEXTBOOK SENIOR ONE LOWER SECONDARY CURRICULUM |
37 |
1 |
PHYSICS |
29-Dec-2022 |
INTRODUCTION TO BIOLOGY |
66 |
1 |
BIOLOGY |
30-Dec-2022 |
INTRODUCTION TO BIOLOGY |
88 |
1 |
BIOLOGY |
31-Dec-2022 |
INTRODUCTION TO BIOLOGY |
89 |
1 |
BIOLOGY |
1-Jan-2022 |
INTRODUCTION TO BIOLOGY |
90 |
1 |
BIOLOGY |