Joseph,

> How do you do a subselect in the from clause?

Assuming that you are using 7.1.0 or higher:

SELECT tbla.a, tbla.b, total_b 
FROM tbla, 
   (SELECT b, sum(f) as total_b FROM tblb GROUP BY b) b_tot
WHERE tbla.b = b_tot.b

If you're using 7.0 still, you're S.O.L.  Time to upgrade ;-)

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      [EMAIL PROTECTED]
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to