Interviewing for Rails jobs can be really tough. You have to know a lot of different things to be a good rails developer:

You might not need to know all of that if you specialize in front-end or back-end only. But, you will need to know a good chunk of it.

Over the last few years, I've interviewed for roughly 30 rails jobs and have been rejected for every reason imaginable.

I bombed a ton of interviews by being bad at whiteboarding and CS questions (I wrote about that previously), but I also struggled with SQL questions in some of them.

Do you need to be a DBA to get an offer?

When you head into a rails job interview, it's unlikely that SQL is going to be the focus of the interview because...

With that said, there is a good chance that you'll be asked a few SQL questions.

The SQL you need to know

So, you don't need to be a DBA, but you will need to know some SQL. The amount you need to know will vary based on your experience, the position, and the interviewer.

Here are the most common questions I've been asked when interviewing for rails jobs:

  1. What is a join? What types of joins are there?
  2. What is the difference between an inner join and a left join?
  3. What is an index? When should you use one?
  4. What is a join table? When would you use one?
  5. Which Active Record association should you use in [X] situation?
  6. Given [X] association (has_one, has_many, belongs_to, etc.), what database schema is needed for this association to work?

Once you can answer these, SQL questions are unlikely to block you from getting an offer at your next interview.

How you can learn this stuff

I learned all of this in bits and pieces and by fumbling around with it for years.

If you want to learn SQL more quickly than I did, I suggest you do the following: