I would like to make a query with a column that lists the results but to a certain extent and then restart the account: For example:
The query lists my 8 results .. in this case, name.
But what I want is for you to count 4 records and start over. Example:
and there we restart ...
Could it be ???
I thought so, to list them all, but I do not know how to stop at 4 and start again in the same query.
SELECT apellido,nombre, CAST(@s:=@s+1 AS UNSIGNED) AS '#'
FROM mitabla,
(SELECT @s:= 0) AS s
WHERE ciudad = "NEUQUEN" and ORDER BY apellido asc, nombre asc