~/devreads

#aggregation

6 posts

1 Mar 2023

Driven by Code 7 min read

By: Kyler Stole TrueCar’s Model Search offers a search results page (SRP) for virtual vehicle models. Combinable filters help you narrow down your vehicle needs to specific models that have what you want. This page was actually preceded by Vehicle Rankings pages, which also filter down models but then rank the results using TrueCar’s proprietary scoring system. When we ported…

aggregationfiltersruby-on-railselasticsearchperformance

11 Sept 2019

lukaseder 1 min read

Using the right data type for some calculation sounds like some obvious advice. There are many blogs about using temporal data types for temporal data, instead of strings. An obvious reason is data integrity and correctness. We don’t gain much in storing dates as 2019-09-10 in one record, and as Nov 10, 2019 in the … Continue reading Oracle’s BINARY_DOUBLE…

sqlaggregationbinary doubledata typesdouble precision

25 May 2018

lukaseder 1 min read

The SQL standard knows a lesser known feature called GROUPING SETS. One particular side-effect of that feature is that we can group by “nothing” in SQL. E.g. when querying the Sakila database: This will yield: count | ------| 1000 | What’s the point, you’re asking? Can’t we just omit the GROUP BY clause? Of course, … Continue reading How to…

sqlaggregationempty group byempty grouping setgroup by

27 May 2016

lukaseder 1 min read

A common myth in SQL is the idea that correlated subqueries are evil and slow. For example, this query here: It “forces” the database engine to run a nested loop of the form (in pseudo code): So, for every actor, collect all the corresponding film_actors and count them. This will produce the number of films … Continue reading Correlated Subqueries…

sqlaggregationcorrelated subquerynested querynested select

5 May 2015

lukaseder 1 min read

In the recent past, we’ve explained the syntactic implications of the SQL GROUP BY clause. If you haven’t already, you should read our article “Do You Really Understand SQL’s GROUP BY and HAVING clauses?“. In essence, adding a GROUP BY clause to your query transforms your query on very implicit levels. The following reminder summarises … Continue reading How SQL…

sqlaggregationcypher query languagegroup bygrouping

23 Jan 2015