Table: cricket_records_4
Columns: matches
innings
not_outs
runs
average

Question: What's the average amount of Runs that has 40 innings, and Not outs larger than 6?
SQL: SELECT AVG("runs") FROM cricket_records_4 WHERE "innings" = 40 AND "not_outs" > 6

Question: What's the total Innings that has Runs of 1598, and Matches less than 41?
SQL: SELECT COUNT("innings") FROM cricket_records_4 WHERE "runs" = 1598 AND "matches" < 41