Query question

From: Stanton Schmidt <sschmidt(at)rgllogistics(dot)com>
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Query question
Date: 2018-03-08 18:58:25
Message-ID: 415803152.48510563.1520535505737.JavaMail.zimbra@rglholdings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,
I am new to the list so feel free to let me know if I am out of line.

My question is:
I have a table that has log events for pieces of equipment. For each piece of equipment this table may contain 1 or more (hundreds potentially).
I need to write a query that will return only the last 5 log events for each (and every) piece of equipment.

log_table (
equipment_id character(30),
log_date date,
log_time time,
event_desc text
)

Thanks for your help.

stanton schmidt
Database Administrator
direct. [ callto:920.884.1281 | 920. ] 471.4495 cell 920.660.1828

RGL
GO AHEAD. ASK WHAT IF.
[ http://www.rgllogistics.com/ | www.RGLlogistics.co m ]

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Martin Stöcker 2018-03-08 19:07:30 Re: Query question
Previous Message Gary M 2018-03-02 00:15:09 Re: How to best migrate this nested join ?