Search Postgresql Archives

counting query

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

 



I have a table definition such as:

CREATE TABLE attendance
(
  attendanceid serial primary key,
  entered date DEFAULT current_date NOT NULL,
  absent boolean,
  authorization text default 'N',
  timeperiod char(2) check(timeperiod in('AM','PM')),
  days varchar(10),
  studentid int,
  unique(entered,timeperiod,studentid)
)

Which is used to record school attendance data. I am now trying to write
a query to identify trends in absences by counting the days column and
returning any student that has repeated absences on certain days. I am
struggling to return anything that does not need further manipulation in
Python before being useful.
Does anyone have any ideas?



[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