i have two table A , table B
table A has ID(primary key), dept, ....
table B has ID(Primary Key), type, date....
let say i have dept as D1, D2, D3 in 10, 20 , 30 numbers in table A
ie count(D1) is 10....
table B might have a certain record corresponding to ID in table A let say
it has 1 records with type = 'general' and date= some date
so like that
i am looking for a query that will give me output as
:between a selected date range
(number of records in table B of certain type)/(total number of records in that dept in table A)
ie
1/10 in the example case
for certain type selected
D1 : 1/10
D2 :....
D3 :....
table A has ID(primary key), dept, ....
table B has ID(Primary Key), type, date....
let say i have dept as D1, D2, D3 in 10, 20 , 30 numbers in table A
ie count(D1) is 10....
table B might have a certain record corresponding to ID in table A let say
it has 1 records with type = 'general' and date= some date
so like that
i am looking for a query that will give me output as
:between a selected date range
(number of records in table B of certain type)/(total number of records in that dept in table A)
ie
1/10 in the example case
for certain type selected
D1 : 1/10
D2 :....
D3 :....