| From: | Geoff Winkless <pgsqladmin(at)geoff(dot)dj> |
|---|---|
| To: | Geoff Winkless <pgsqladmin(at)geoff(dot)dj>, Postgres General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Proper relational database? |
| Date: | 2016-04-24 12:37:30 |
| Message-ID: | CAEzk6fdkfVCiqpv48az5dSD9bAhTOjZdxkJxEas4w+fno4xcbQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 24 April 2016 at 12:29, Geoff Winkless <pgsqladmin(at)geoff(dot)dj> wrote:
> To find students with no exam today (the other point of your argument):
>
> SELECT student_id, name
> FROM student
> LEFT JOIN exam USING(student_id)
> WHERE exam_date=CURRENT_DATE AND exam.student_id IS NULL;
*sigh* problem with writing emails in a rush. Of course I meant
SELECT student.student_id, name
FROM student
LEFT JOIN exam ON exam.student_id=student.student_id AND exam_date=CURRENT_DATE
WHERE exam.student_id IS NULL;
Geoff
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2016-04-24 13:49:52 | Re: Is it possible to recover the schema from the raw files? |
| Previous Message | david | 2016-04-24 12:10:20 | Re: Proper relational database? |