You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@zasdaym
Your query is working now, You just have to work with placeholders instead of table names.
SELECT
- links.id+ l.id,- links.destination,+ l.destination,- COUNT(visits.id) AS visit_count+ COUNT(v.id) AS visit_count-FROM links LEFT JOIN visits ON links.id = visits.link_id+FROM links l LEFT JOIN visits v ON l.id = v.link_id-GROUP BY links.id;+GROUP BY l.id;
Version
Other
What happened?
sqlc generate
failed when using the described schema and query. The version used is v1.16.0.Relevant log output
column reference "id" not found
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/c8d3c10a1bb40e4c91484e3334f3ae33e7764a7f5e4ba6742c6842c4c13c5933
What operating system are you using?
macOS
What database engines are you using?
No response
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: