Read this (covers performance and internals): https://use-the-index-luke.com
And this (covers "advanced" SQL, more than the usual functions): http://www.windowfunctions.com