I have a table as
Table "public.timereport"
Column |Type |
Modifiers
--+-+
id | integer
>
> ERROR:
> SELECT DISTINCT ON expressions must match
> initial ORDER BY expressions may be gotten over by
> wrapping the first query result in a subselect.
>
> not sure though if its proper.
> regds
> mallah.
>
> test=# SELECT * from ( SELECT distinct on (a.id) b.id
> ,courseid,name,submission
ERROR:
SELECT DISTINCT ON expressions must match
initial ORDER BY expressions may be gotten over by
wrapping the first query result in a subselect.
not sure though if its proper.
regds
mallah.
test=# SELECT * from ( SELECT distinct on (a.id) b.id
,courseid,name,submission from course a joi
Hi,
I was very glad to see the replies from you guys this
morning. The two suggested SQL queries did not return
the expected results, but will help me to explain the
problem I am facing further.
1) Josh suggested the following query. (I have made
minor changes by adding the table name to each f
Eddie,
> My requirements involve several large tables. I have
> simplied scenario into the follow two fictional tables
> which describes the same requirements.
Keep in mind that a simplified example may not solve your real problem ...
> Basically I would like to display the latest
> submission f
Hi,
I have a table messages which has (for simplicity) two columns -
msg_id, last_id, where last_id is sort of symbolical link -
it points to the msg_id of the last version of message.
There are no limitation to the number of versions.
The problem I have is to get history of message with given