Basic Query Question

From: Jude Lucien <jlucien(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Basic Query Question
Date: 2011-12-07 20:55:28
Message-ID: CAPRXF2reaM5Ye4z_A5+7aZ7GowktQC4aeBY5kzu17JEiKzgpwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sorry for the basic question, I can't seem to figure it out.

I have two tables, booking and bike. Both have bike_id as primary key.

I am trying to return all bike_id's where bike.model='Kona' AND
booking.booking_date DOES NOT EQUAL 'date';

My query is as follows:

SELECT bike.bike_id FROM bike,booking WHERE bike.model='model' AND
booking.booking_date!='2011-11-20' AND bike.bike_id=booking.bike_id;

Any help appreciated!

Jude

--
"None are more hopelessly enslaved than those who falsely believe they
are free"  -- Johann Wolfgang von Goethe

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ramy Abdel-Azim 2011-12-07 21:02:31 Re: Basic Query Question
Previous Message Jean-Yves F. Barbier 2011-12-07 20:40:23 Re: Linux server connection process consumes all memory