-1
Hello.
I have a table where I have in one column a registration number and in another the number of keys registered in this record.
I am willing to take this data for analysis, however, as there are millions of record numbers, I was only willing to take a sample of 20,000 of these on condition that the key number is "x".
In short, I need a function that extracts random lines (because for my sample it is not worth taking the column order).
example of consultation:
SELECT id, chaves
FROM tabela
WHERE chaves BETWEEN 0 and 5
LIMIT 20000
In case I imagine that after the SELECT
has a function that generates random value (maybe something like random(id)
) or else there ORDER BY RANDOM
, or something like.
Someone could help me?