sql query help please!! [message #372926] |
Mon, 19 March 2001 00:32 |
david sharon
Messages: 2 Registered: March 2001
|
Junior Member |
|
|
hi. iam facing a problem in sql query can someone help me please.
i have the following tables
1. P_apm_master : e-code,p-code,apm,target
2. p_trans :e-code,apm,actuals
I want the out put as
e_code p_code no of apm's target missedTarget
------ ------ ------------ ------- -----------
i.e i want to count the number of apm's(distinct) and the number of those which have not reached the target(i.e actual < target)
i want to do it in a single query(with any type of subquery)
Can someone help me write the query.It's urgent and iam posting it with real hope that someone would help me.
|
|
|