I have moved this over to the Tech Interview Cheat Sheet Repo since a gist is too difficult to maintain as an open source endevaor and there is no way to version it. I have updated below, but I will not be able to keep this one up to date so please checkout the repo instead. The below is just for some preservation for those who stumble across here.
\
Select but without duplicates
SELECT distinct name, email, acception FROM owners WHERE acception = 1 AND date >= 2015-01-01 00:00:00
Calculate total number of records
SELECT SUM([column]) FROM [table];
Count total number of [column]
and group by [category-column]