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

Answer: 
```
SELECT PlateNo, TicketStatus, [Date]
FROM (SELECT ROW_NUMBER() OVER (PARTITION BY PlateNo ORDER BY [Date] ASC) AS [index],
             PlateNo,
             TicketStatus,
             [Date] 
      FROM YourTable) A
WHERE [index] = 1

```
But I suggest you to change your *Date* field to other field name, like **the\_date** .
It's just for avoid clashed with SQL syntax.

`SELECT *, MIN(the_date) AS min_date FROM YOUR_TABLE;`