Results 1 to 2 of 2

Thread: Locating Duplicates from 2 Queries

  1. #1
    Join Date
    Jan 2015
    Posts
    1

    Red face Locating Duplicates from 2 Queries

    I have one query below:

    select magazine_name, season_letter
    from magazine
    where source = 'D1000'
    and season_letter = 'A'
    order by mag_name

    I have a second query below:

    select magazine_name, season_letter
    from magazine
    where source = 'D1000'
    and season_letter = 'B'
    order by mag_name

    But I would like some help trying to figure out how to find the same mag_name from each query and I was thinking something around the line of below:

    select mag_name
    **some kind of exists in statement***
    (query 1)
    and in
    (query 2)

    Any help would be greatly appreciated

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    select mag_name
    from magazine
    where source = 'D1000'
    and season_letter = 'A'
    where magazine_name in
    (select magazine_name
    from magazine
    where source = 'D1000'
    and season_letter = 'B')

Posting Permissions

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