General questions about sql versus r?

Hey there R community,

I am currently learning more about R programming and sql. It seems R is more comprehensive than sql but I need to learn both. This R community has helped me a lot already when I ask questions, so I have some more directed towards anyone who uses R or sql.

Do you use R more than sql? Do employers care what cleaning program you use?

Where is the best sql community to join? I love this community because everyone's so helpful and I'd love to find a community like this for sql issues. Any recommendations?

Thank you everyone, and happy early Halloween! Treat below:

/╲/\╭[ :yin_yang: _ :yin_yang: ]╮/\╱\

Time was that SQL ruled tabular data creation, queries and modification for datasets of all sizes, and it’s still the king of the massive real-line transaction hill.

Most of what is really valuable in SQL is database design and administration, which is a career path all its own, separate from data science.

The basic language for queries is well worth learning, especially since it can be done from within R.

SELECT ALL students FROM class WHERE GRADE = “B”

Nice seeing you again, @technocrat,

I just realized you could do queries in R, that's so cool. I forgot what package you had to load, but it's definitely worth looking into. I know a little about sql, but so far prefer R over it. But know that sql is preferred in the applications I look at. But was curious how companies actually were and if you could use either or.

Hi,

To practice, install MariaDB or MySQL and leave the server daemon running. In R install DBI and either RMariaDB or RMySQL. A script looks something like

library(DBI)
    library(RMySQL)
    drv <- dbDriver("MySQL")
    con <- dbConnect(drv, username="root", password="", dbname ="dlf", host="localhost")

    res <- dbGetQuery(con, "SELECT fico FROM y6")

where res ends up as a data frame.

My experience is that if an employer is asking for SQL, you should expect to be using it. R is more often a nice-to-have. Cynically, most job posting for data scientists are really seeking someone who can produce feel-good eye candy.

1 Like