Skip to content

Group elements by month three by three

I have this Standard SQL query: With the following output: You can simulate the output with: I am retreiving the entries of the last 12 months. I have already grouped and ordered them by month, but I need to also group them three by three according to the month. Moreover, as you can see in the output there ar…

SQL – Period range in subgroups of a group by

I have the following dataset: A B C 1 John 2018-08-14 1 John 2018-08-20 1 John 2018-09-03 2 John 2018-11-13 2 John 2018-12-11 2 John 2018-12-12 1 John 2020-01-20 1 John 2020-01-21 3 John …

Compare two Count() values sql

I have a table called “Takes” that has the following information. Takes(stud_id, class_id, sec_id, semester, year, grade) I wanted to find the id’s of the students who took more classes in …

Typeorm MINUS operator

I’m trying to do a set difference in SQL. I’ve discovered the MINUS operator, which seems to do exactly what I need: https://www.geeksforgeeks.org/sql-minus-operator/ I’m trying to figure out if there’s a way to use this operator via typeorm. I’m currently using connection.getRep…

Does Oracle 19 database support UUID columns?

Does Oracle 19 database support UUID columns, to store for example 123e4567-e89b-12d3-a456-426614174000? I know that Oracle NoSQL supports this, but I’m looking for Oracle SQL. If not how should I …

Mikro-ORM: error: there is no parameter $1

Alright so I’ve been trying to search Mikro-ORM’s docs to find how to pass in native sql query params in but I haven’t been able to find anything. After playing with the code a bit this is what it looks like which I think is sort of right but I’m getting this error My code currently lo…