Question: Is there a way to obtain current line number in executing Qt Script, using objects and functions in it?

Answer: 
You have to put a group by when you use a Min if I remember well

```
SELECT  MIN(date), PlateNo, Ticket_status
FROM your_table
GROUP BY date, PlateNo, Ticket_status

```
ANSI Standard. Simple. Works across all DBs ...

```
select * from YourTable
where [Date] = (select min([Date]) from YourTable)

```