I am wondering if there is a way to make this work. I am deriving a table "WHERE lie_start='green'" (and a bunch of other conditions which i don't wanna repeat), need to get the number (and several other information) off it. Additionally I need the number of entries with the additional condition lie_finish='holed'. Currently I'm gettin the error: Table mydb.x doesnt exist.
SELECT
COUNT(*) AS total,
(SELECT COUNT(*) FROM x WHERE lie_finish='holed') as holed
FROM (SELECT * FROM mydb.strokes WHERE lie_start='green') as x