i m develop a system related car in/out records. I got data fields like date, time in, time out, car numbers......
My problem is How to count the repeat records base on repeat car numbers on a certain date?( my purpose is count how many times a car in/out on a certain date) :?: :?:
i hope anyone here can understand my problems and pls help me

11 Years
Discussion Span
Last Post by Yomet

If I understand your problem correctly you want to know how many times a certain car was in/out on a certain date. Is that correct?

If so, you can issue the following query:

SELECT Table.Date, Table.car, Count(Table.car) AS CountOfcar
FROM Table
GROUP BY Table.Date, Table.car;

This will give you a dataset that has the date, the car number and how many time that car appears during that date. If you need to restrict the records further, for example only those that have both in and out times or for a specific date range, just add a WHERE clause to restrict the data.

Hope this helps



Listen to Comatose - he's totally correct.

I made the unsaid assumption that you are using some kind of SQL compliant database as your back end - otherwise you'll have to find another way of doing this.

Thank you Comatose for setting me straight... ;)

I'll do my best not to make unsaid assumptions again... :)


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.