Home » RDBMS Server » Server Administration » Count broken down By month. URGENT!!!!!!!!!!!!!!!!!!!!!!!!!
Count broken down By month. URGENT!!!!!!!!!!!!!!!!!!!!!!!!! [message #373381] Fri, 13 April 2001 10:16 Go to next message
aish74
Messages: 19
Registered: March 2001
Junior Member
I want TO COUNT the no of employees worked in the particular division for a particular month. It should be broken down BY division AND month.

something LIKE the following:

Division JAN FEB MAR APR

A 10 9 11 7
B 3 6 12 8
C 4 4 4 4

In the month of Jan the no of working employees In division "A" are 10 and 9 in FEB .

Similarly In the month of Jan the no of working employees In division "B" are 3 and 6 in FEB .

COuld any body help me .
Its URGENT please
Re: Count broken down By month. URGENT!!!!!!!!!!!!!!!!!!!!!!!!! [message #373384 is a reply to message #373381] Fri, 13 April 2001 10:20 Go to previous messageGo to next message
sandeep
Messages: 110
Registered: October 2000
Senior Member
have you tried group by division,
group by month
Re: Count broken down By month. URGENT!!!!!!!!!!!!!!!!!!!!!!!!! [message #373385 is a reply to message #373381] Fri, 13 April 2001 10:38 Go to previous messageGo to next message
aish
Messages: 44
Registered: March 2001
Member
Yes I am using it.The result is comming something like

Division no of employee mon
A 10 3
a 5 2

I am not able to understand the result.How do I know weather 10 is th no of employee in JAN or Feb
Re: Count broken down By month. URGENT!!!!!!!!!!!!!!!!!!!!!!!!! [message #373386 is a reply to message #373381] Fri, 13 April 2001 10:49 Go to previous messageGo to next message
aish
Messages: 44
Registered: March 2001
Member
In simple words.How do I write a sql that gives me the no of working employee in division in the month of JAN and In the month of FEB ang MAR and so on .

Division emplid transfer dt
A 1111 11/1/00
22222 9/21/00
33333 9/21/98

B 1000 9/21/99
2000 9/21/00
3000 1/21/ 99

C 2222 9/21/99
3333 9/21/99
44444 9/21/99
Re: Count broken down By month. URGENT!!!!!!!!!!!!!!!!!!!!!!!!! [message #373387 is a reply to message #373381] Fri, 13 April 2001 10:49 Go to previous messageGo to next message
aish
Messages: 44
Registered: March 2001
Member
In simple words.How do I write a sql that gives me the no of working employee in division in the month of JAN and In the month of FEB ang MAR and so on .

Division emplid transfer dt
A 1111 11/1/00
22222 9/21/00
33333 9/21/98

B 1000 9/21/99
2000 9/21/00
3000 1/21/ 99

C 2222 9/21/99
3333 9/21/99
44444 9/21/99
Re: Count broken down By month. URGENT!!!!!!!!!!!!!!!!!!!!!!!!! [message #373388 is a reply to message #373381] Fri, 13 April 2001 10:50 Go to previous messageGo to next message
aish
Messages: 44
Registered: March 2001
Member
In simple words.How do I write a sql that gives me the no of working employee in division in the month of JAN and In the month of FEB ang MAR and so on .

Division emplid transfer dt
A 1111 11/1/00
22222 11/1/00
33333 9/21/98

B 1000 9/21/99
2000 9/21/99
3000 9/21/99

C 2222 9/21/99
3333 9/21/99
44444 9/21/99
Re: Count broken down By month. URGENT!!!!!!!!!!!!!!!!!!!!!!!!! [message #373389 is a reply to message #373381] Fri, 13 April 2001 10:51 Go to previous message
sandeep
Messages: 110
Registered: October 2000
Senior Member
use
order by division,
order by month desc
the most recent month will be on top

let me know if this helps
Previous Topic: Count broken down By month. URGENT!!!!!!!!!!!!!!!!!!!!!!!!!
Next Topic: DELETE MULTIPLE TABLES FROM QUERY RESULT
Goto Forum:
  


Current Time: Mon Dec 23 10:08:17 CST 2024