postgres get random element code example Example: postgres random select select * from app_product order by random() limit 10;