Select firstname, Lastname from Table_Name
where Firstname Like 'J%' OR Firstname Like 'A%' OR Firstname Like 'T%'
AND Lastname Like '%on'
order by Firstname;
NOTE: % here means 0 or more characters. Therefore, J% denotes a name that should start with J and can have 0 or more characters after that. Also, %on denotes a name that should end with 'on' and can have 0 or more characters before 'on'.
The table name mentioned by above query is wrong. Please try this below query.
Select first_name, Last_name from customer
where First_name Like 'J%' OR First_name Like 'A%' OR First_name Like 'T%'
or Last_name Like '%on'
order by First_name;
Hope this query helps you.
Lucky Customers
Description: List the first and last names of all customers whose first names start with the letters 'A', 'J' or 'T' or last names end with the substring 'on'. Arrange them alphabetically in the order of their first names.
Sample Output