Search Postgresql Archives

Re: Proper relational database?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24 April 2016 at 12:29, Geoff Winkless <pgsqladmin@xxxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux