Hari Shanker

Hari Shanker

  • NA
  • 260
  • 32.4k

Sql group by task

Dec 2 2016 2:08 AM
 
 
                   
 

INPUT

         

OUTPUT

     
   

id

dept

amount

     

dept

amount

 
   

1

sales

2000

     

sales

3000

 
   

2

sales

1000

     

income

1000

 
   

3

income

300

     

others

400

 
   

4

income

200

           
   

5

income

500

           
   

6

tax

100

           
   

7

custom

200

           
   

8

extra

100

           
                     
 
need query for the above output table 
 
 
Thanks,
Hari 

Answers (2)