SELECT loyalty_card.card_ID, Customer.first_name,customer.last_name, loyalty_card.points
FROM loyalty_card
INNER JOIN customer
ON loyalty_card.Customer_ID=Customer.Customer_ID;
having count(loyalty_card.points) > 100
I keep trying to complete the query, but I am getting error messages.
#1064 - You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax
to use near 'having count(loyalty_card.points) > 100' at line 1
Can anyone help? I am using phpMyAdmin and MySQL.
having, so it is being treated a two separate SQL statements:SELECT loyalty_card.card_ID ... Customer.Customer_ID;andhaving count(loyalty_card.points) > 100, the latter of which is not being terminated by a semicolon.