It means that MySQL cannot find the table payments in the sql_store database.
This is not a syntax problem with your SUM() query — it’s a missing table/database issue.
Wrong database selected — You might be connected to sql_store, but that database doesn’t have a payments table.
Table name mismatch — The table might have a different name (e.g., payment, customer_payments, orders).
Database not loaded — If you’re following a tutorial (like Mosh Hamedani’s SQL course), the sample database might not have been imported.