Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

SQL Query - Joining 2 Recordsets to display all columns requested

Guest
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

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!!!
TOPICS
Server side applications

Views

196
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

LATEST
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.


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines