Skip to main content
September 13, 2006
Question

SQL Query - Joining 2 Recordsets to display all columns requested

  • September 13, 2006
  • 1 reply
  • 218 views
Hi

I'm trying to join two SQL SELECT Statements to output the information into a table on a html page.

They both query the same table maccount but on different selection criteria

here are the two statements below

SELECT muser, COUNT(status) * 40 / 35 AS Expr1
FROM maccount
WHERE ((status <> '0')) GROUP BY muser


SELECT muser, COUNT(status) * 60 / 35 AS Expr2
FROM maccount
WHERE ((status = '1')) GROUP BY muser

I need to join these to give me three colums, muser, Expr1, Expr2

Any ideas? I've run out!!!!

Thanks for any help!!!
This topic has been closed for replies.

1 reply

Inspiring
September 13, 2006
Please take this the right way - go learn SQL before trying to write SQL
queries.
www.sqlcourse.com
www.sqlcourse2.com

You'll be much happier when you can solve this type of problem on your own
and only have to ask for help with the tricky ones.


"gailcooper" <webforumsuser@macromedia.com> wrote in message
news:ee90ic$8to$1@forums.macromedia.com...
>
> I'm trying to join two SQL SELECT Statements to output the information
> into a
> table on a html page.