Stumped on SQL problem

Results 1 to 2 of 2

Thread: Stumped on SQL problem

  1. #1
    Join Date
    Dec 1969

    Default Stumped on SQL problem

    I need to SELECT all the DISTINCT records from 2 tables into one query, then COUNT how many of times each distinct rec shows up in each table.<BR><BR>I&#039;m having trouble SLECTing the distinct recs from both tables. This is my SQL:<BR><BR>SQL="SELECT DISTINCT myauctions.Title, nowinners.Title FROM &#039;myauctions&#039;, &#039;nowinners&#039;"<BR><BR>but it does not give me the distinct recs.<BR>any ideas?

  2. #2
    Medieval Dude Guest

    Default RE: Stumped on SQL problem

    I think I would use two separate SELECT statements.<BR><BR>SQL1="SELECT Title, COUNT(*) AS ma_count FROM myauctions GROUP BY Title"<BR>SQL2="SELECT Title, COUNT(*) AS nw_count FROM nowinners GROUP BY Title"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts