how it works: 1. You write queries in SQL. 2. You run sqlc to generate code with type-safe interfaces to those queries. 3. You write application code that calls the generated code. Check out an interactive example to see it in action, and the introductory blog post for the motivation behind sqlc. 簡単にいうと、 sqlcは、型安全なコードを生成します 🎉 そのために、プログラマーは、 1. SQLを書く 2. sqlcコマンドでコードを生成する 3. アプケーションコードからsqlcで生成されたコードを呼び出す 9
item_count FROM items JOIN users ON items.user_id = users.id WHERE items.created_at BETWEEN '開始日' AND '終了日' GROUP BY users.id, users.name ORDER BY item_count DESC; 31