"Igor Tandetnik" wrote... > "jose isaias cabrera" <[EMAIL PROTECTED]> > wrote in message news:[EMAIL PROTECTED] >> imagine almost the same data, >> >> Class|ProjID|ProjFund|Invoice|PM|Split >> Finishers|1045|73||JIC| >> Finishers|1045|75|30|LED| >> Finishers|1045|75|30|SAN| >> Finishers|1045|75|30|JIC| >> Finishers|1045|75||ELI| >> Finishers|1045|75|75|ELI|y >> Finishers|1045|75|25|| >> Finishers|1045|73||JIC| >> Finishers|1045|73||LED| >> Finishers|1045|73||KAP| >> Finishers|1045|73|58.4|ELI|y >> Finishers|1045|73||| >> >> I would like to also get the PM value when split = 'y'. > > In the previous problem, you got one row for each distinct Class/ProjId > pair. Do you now want to group by Class/ProjId/PM tuple? If not, and you > still want to group by Class/ProjId, what should happen if, within this > group, there are two different PMs both marked with Split='y'? For > example, what resultset do you expect for input like this: > > Class|ProjID|ProjFund|Invoice|PM|Split > Finishers|1045|75|75|JIC|y > Finishers|1045|75|30|LED|y
The PM is the same for the same ProjID because the split is a one to one assignment, so that should not happen. So, if there is a case like this, the PM has been set wrong. What I would like to have is a total of the ProjFund, ProjFund total - invoice total where Split = 'y', invoice total where Split = 'y', the first (or last or any of the) PM that Split = 'y'. thanks, josé _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users