skip to Main Content

Mysql – Nested Queries/ JOIN IN SQL

Question: List the name of the team and number of wins of all teams that had more wins than the average team had. Order results by descending number of wins. SELECT mlb_team.name, mlb_team.wins, AVG(mlb_team.wins) FROM mlb_team GROUP BY mlb_team.name HAVING…

VIEW QUESTION

how to optimize the below MYSQL query

the below query it scans more rows while the table has an index on it but not using that index for that column. Query; SELECT * FROM st_aepsrequest_log WHERE `snd_transno` IN ( SELECT pwcashout_transno FROM st_aeps_transaction_master a WHERE a.`entry_date` >=…

VIEW QUESTION
Back To Top
Search