I have this SQL to select 1000 from 2000 records.
(SELECT
@rownum := @rownum + 1 AS rownum,
data.*,
IF(@rownum % 2 = 1, '1', '2') AS grp,
But now I am required to select 1000 from 1918 using the same notation, order.
That means I need to do instead of 2 a value of 1.918
How to do that via the SQL?
1 Answer