Build SQL queries with temporary table vs WHERE IN
When writing SQL queries to check if a value matches against a list of given values, we normally use the IN operator. For example, suppose we have a requests table, and it contains an account_id column that is referencing accounts table. If we want to find a list of requests which only belongs to certain accounts, we would write a SQL query like:
Tech Notes from Steven