Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql select random procentage from rows

-- for 10% -- 
SELECT * FROM table_name
	ORDER BY random() 
	LIMIT (SELECT (COUNT(*)*0.01)::INT FROM table_name);
 
PREVIOUS NEXT
Tagged: #sql #select #random #procentage #rows
ADD COMMENT
Topic
Name
3+2 =