here is my table MAGACIN
GBR DATA SIFRA IME KOL
1001 18.10.2011 0991000 DIZEL GORIVO 45
1001 18.10.2011 0991000 DIZEL GORIVO 55
1001 21.10.2011 0992201 AD-BLU 12
1001 22.10.2011 0991000 DIZEL GORIVO 140
1001 26.10.2011 0991000 DIZEL GORIVO 90
1001 27.10.2011 0991000 DIZEL GORIVO 120
1001 28.10.2011 0991000 DIZEL GORIVO 45
1001 29.10.2011 0991000 DIZEL GORIVO 85
1001 30.10.2011 0991000 DIZEL GORIVO 80
1001 31.10.2011 0009055 TRAKA IZOLIR 1
1001 31.10.2011 0009041 BOJA BELA (AVTO) 1
1001 31.10.2011 0037005 SMIRGLA NA PLATNO 3
1001 31.10.2011 0009049 RAZREZIVAC AVTO 1
1001 31.10.2011 0037042 SMIRGLA VODENA 3
1002 19.02.2011 0991000 DIZEL GORIVO 8
1002 22.02.2011 0991000 DIZEL GORIVO 10
1002 23.02.2011 0991000 DIZEL GORIVO 110
1002 25.02.2011 0991000 DIZEL GORIVO 60
1002 25.02.2011 0991000 DIZEL GORIVO 50
1002 26.02.2011 0991000 DIZEL GORIVO 130
1002 28.02.2011 0991000 DIZEL GORIVO 125
1002 01.03.2011 0991000 DIZEL GORIVO 65
1002 01.03.2011 0991000 DIZEL GORIVO 40
1002 02.03.2011 0991000 DIZEL GORIVO 100
1002 03.03.2011 0991000 DIZEL GORIVO 115
and I want to sum the KOL by GBR, Data>=10.02.2011 and Data<=31.10.2011, SIFRA='0991000'.
For example
1002 19.02.2011 28.02.2011 0991000 DIZEL GORIVO 368
1001 18.10.2011 31.10.2011 0991000 DIZEL GORIVO 681
I want to have one row for every GBR for that time period and SUM(KOL),
can anybody help me please?
Thank you
GBR DATA SIFRA IME KOL
1001 18.10.2011 0991000 DIZEL GORIVO 45
1001 18.10.2011 0991000 DIZEL GORIVO 55
1001 21.10.2011 0992201 AD-BLU 12
1001 22.10.2011 0991000 DIZEL GORIVO 140
1001 26.10.2011 0991000 DIZEL GORIVO 90
1001 27.10.2011 0991000 DIZEL GORIVO 120
1001 28.10.2011 0991000 DIZEL GORIVO 45
1001 29.10.2011 0991000 DIZEL GORIVO 85
1001 30.10.2011 0991000 DIZEL GORIVO 80
1001 31.10.2011 0009055 TRAKA IZOLIR 1
1001 31.10.2011 0009041 BOJA BELA (AVTO) 1
1001 31.10.2011 0037005 SMIRGLA NA PLATNO 3
1001 31.10.2011 0009049 RAZREZIVAC AVTO 1
1001 31.10.2011 0037042 SMIRGLA VODENA 3
1002 19.02.2011 0991000 DIZEL GORIVO 8
1002 22.02.2011 0991000 DIZEL GORIVO 10
1002 23.02.2011 0991000 DIZEL GORIVO 110
1002 25.02.2011 0991000 DIZEL GORIVO 60
1002 25.02.2011 0991000 DIZEL GORIVO 50
1002 26.02.2011 0991000 DIZEL GORIVO 130
1002 28.02.2011 0991000 DIZEL GORIVO 125
1002 01.03.2011 0991000 DIZEL GORIVO 65
1002 01.03.2011 0991000 DIZEL GORIVO 40
1002 02.03.2011 0991000 DIZEL GORIVO 100
1002 03.03.2011 0991000 DIZEL GORIVO 115
and I want to sum the KOL by GBR, Data>=10.02.2011 and Data<=31.10.2011, SIFRA='0991000'.
For example
1002 19.02.2011 28.02.2011 0991000 DIZEL GORIVO 368
1001 18.10.2011 31.10.2011 0991000 DIZEL GORIVO 681
I want to have one row for every GBR for that time period and SUM(KOL),
can anybody help me please?
Thank you