R and SQL are two completely different beasts;<p>you can use one in conjunction with the other;<p>R is a general programming language with a huge library of mostly statistical analysis routines.<p>SQL is a way to get data in&#x2F;out of a database<p>You might want to use SQL for trivial analyses, and anything more, maybe use R. But you can use SQL from R to get the data.