So I am starting to be a little familiar with sas, and I realize that a lot of operations that I learned to do with data sets can also be done using **proc** sql statements, including merging, creating variables, subsetting and many others.

My question is therefore : "When is it best to do what ?", is proc sql better ? always ? Which is the fastest, which is the less memory-consuming ? 

Note that I probably anticipate that the answer is "it depends", in which case I would like to know on what.