SELECT entityid, email FROM customer WHERE isinactive = 'F' ORDER BY entityid ASC;
- This query retrieves all active customers (
isinactive = 'F'). - It selects the
entityid(customer name) and theiremail. - The results are sorted alphabetically by
entityidusingORDER BY ASC.