---
title: Advanced ActiveRecord Querying, Now on Upcase
teaser: Master ActiveRecord and take full advantage of your database with our newest
  course on Upcase.
tags: upcase,rails,news
author: Chris Toomey
published_on: 2016-03-10
---

ActiveRecord is one of the many tools where I learned just enough to get by. I
could `select`, and filter with `where`, but more advanced operations were
beyond me. I would often drop back into Ruby code to filter arrays or make
multiple database queries where I could almost certainly use just one, if I had
only known how to go a bit further with ActiveRecord.

Well, if you're anything like me, then you're in luck as today we're announcing
our newest course on Upcase: [Advanced ActiveRecord Querying][aarq]. The course
is taught by thoughtbot CTO Joe Ferris, with me along for color commentary, and
covers everything you need to take advantage of all the power of ActiveRecord.
This is our first course that combines videos and exercises so that you can
**immediately apply what you're learning**.

[![](https://images.thoughtbot.com/upcase/trail-title-cards/advanced-activerecord-querying.jpg)][aarq]

With this course you'll learn how to write highly efficient queries that **take
advantage of the full power of your database**, while still getting to work from
the comfort of the ActiveRecord query language.  It turns out that ActiveRecord
isn't all-or-nothing: you can use its Ruby methods 90% of the time, and when you
absolutely have to write the SQL yourself, it'll handle that just fine.

In the course we assume you've got the basics down and dive right into building
more complex queries, taking full advantage of the power of our database. We
have videos and exercises for all of our great topics:

* Traverse `belongs_to` relationships with `joins` and `merge`
* Combine tables backing `has_many` together for efficient queries
* Use custom joins and the powerful but obscure `merge` method to combine data
  exactly how you need it
* We even cover how to perform complex aggregations (like counting and summing)
  of your data, all without needing to fall back to fully handwritten SQL
  statements (because really, who wants that?).

For Upcase subscribers, the whole course is available today. Plus, all visitors
can watch the **first two videos for free** to get a taste of the querying
magic.

<div class="post-cta-section">
    <div class="cta-image-wrapper">
      <img
        class="cta-image"
        src="https://images.thoughtbot.com/advanced-active-record-querying/PqsvpcrYTYdLMcOpeIoY_advanced-active-record-querying.jpg"
        alt=""
      />
    </div>

  <div class="cta-content">
    <p>
      Ready to master ActiveRecord and take full advantage of the power of your
      database?
    </p>

    <a
      class="cta-button"
      href="https://thoughtbot.com/upcase/advanced-activerecord-querying?utm_source=giantrobots&utm_medium=blog&utm_campaign=aarq-announcement">Get
      Started Now
    </a>
  </div>
</div>

[aarq]: https://thoughtbot.com/upcase/advanced-activerecord-querying?utm_source=giantrobots&utm_medium=blog&utm_campaign=aarq-announcement
