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

Answer: 
```
select top 1 * from TableName order by [Date]

```

that way you will get all the relevant data
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

```