single SQL statement

  • Can someone please help me ?

    I need to write a single sql statement which retrieves the list of fruits, and the usernames of the users which have access to them. Use the tables below.

    `users` table

    username |group |password

    bchen |users |********

    jmax |admin |********

    mwilson |users |********

    `fruits` table

    fruit |access

    banana |users

    blueberry |admin

    cherry |users

    papaya |users

    strawberry |admin

    The output of the sql statement should look like this:

    fruit |username

    banana |bchen

    banana |mwilson

    blueberry |jmax

    cherry |bchen

    cherry |mwilson

    papaya |bchen

    papaya |mwilson

    strawberry |jmax

  • Please do not post in multiple forums...

    Follow the thread here







    **ASCII stupid question, get a stupid ANSI !!!**

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply