You want to send raw sql from Power Query to your database because you're better at query folding than Excel.
me@jaykilleen.com wrote this over 4 years ago and it was last updated over 4 years ago.
let
Source = Odbc.Query("dsn=odbc_connection_name",
"
SELECT
COUNT(*)
FROM
dates
"
)
in
Source