R is great for fitting models and so on as explained by others.  Most R functions expect a 2d matrix or table-like input.<p>SQL is great for choosing which columns to get out of multiple tables, somehow combined, as well as to filter which rows.  If the end result is ready for R to use in modeling, that&#x27;s great.<p>R can struggle to index and manipulate large datasets for combining&#x2F;selecting columns and filtering rows, but that&#x27;s the really nice stuff in SQL.  They work well enough together and it&#x27;s really no big deal to set both up.