If you're dealing with SQL Server try
Select Top 6 RecordID, NoOfTime, Day&Time from (table) order by Day&Time DESC
cmsjr
2009-12-07 20:09:53
If you're dealing with SQL Server try
Select Top 6 RecordID, NoOfTime, Day&Time from (table) order by Day&Time DESC
SELECT RecordID, NoofTime, Day&Time FROM table ORDER BY Day&Time DESC LIMIT 6;
depending on your SQL engine you will probably have to put some quotes around Day&Time.
The above syntax works with Mysql and PostgreSQL, for varous syntax used for this kins of request you can have a look there select-limit
How about
SELECT TOP(6) *
FROM [Trips]
ORDER BY [Day&Time] DESC
I'm not sure what you mean by "in one line," but this will fetch the 6 most recent records.
For the same line portion, you can use a cursor if you are using SQL server 2008 (might work with 2005 I am not sure).
SELECT x.*
FROM (SELECT t.*
FROM TABLE t
ORDER BY day&time DESC) x
WHERE ROWNUM <= 6
SELECT TOP 6 t.*
FROM TABLE t
ORDER BY day&time DESC
SELECT t.*
FROM TABLE t
ORDER BY day&time DESC
LIMIT 6