fruitwerks
10-28-2009, 12:46 AM
This will be rather simple for the more seasoned persons here, but I have never had to do anything like this so far...
SELECT
pnl.pnl_desc,
pnl.pnl_value,
pnl.id_pnl
FROM
pnl
WHERE
(pnl.pnl_cust = whatever_id_I_need)
this gives me some raw details but for each match on the above, I need some more details
WHERE pnl_trans = pnl.id_pnl [
COUNT notes.note
COUNT pnl_items.items
SUM pnl_items.value
SUM payments.value
]
the above mentioned tables all have the pnl_trans (PK from pnl) and cust_id (pnl_cust)
no idea what method would be best, or exactly how to structure it
Thanks!
SELECT
pnl.pnl_desc,
pnl.pnl_value,
pnl.id_pnl
FROM
pnl
WHERE
(pnl.pnl_cust = whatever_id_I_need)
this gives me some raw details but for each match on the above, I need some more details
WHERE pnl_trans = pnl.id_pnl [
COUNT notes.note
COUNT pnl_items.items
SUM pnl_items.value
SUM payments.value
]
the above mentioned tables all have the pnl_trans (PK from pnl) and cust_id (pnl_cust)
no idea what method would be best, or exactly how to structure it
Thanks!