Skip to content

IBM Cognos Analytics Selecting top 2 from a dataset

I’m working on a report where I need data for current week, and the week before, and compare these two. I have a week column in my data, which are transactions, So my data looks something like: Amount …

How to group by two columns in different CASE clauses

I have a query that’s giving me the results I want, but for each item with a given ID_UNIDAD_EXPERIMENTAL there are two rows, one with column “Alt” with a value and column “Dap” with null, and the other one with “Alt” null and “Dap” with a value. My questi…

waitlist in postgres, deadlock

I’m trying to create a waiting list in Postgres. Minimal code: status is important, because I want to be able to notify users when they are applied after waitlisted. But don’t want to notify them based on that they are in the first n position if they wasn’t waitlisted at all. Services are li…

how to filter aggregate query ordered by date

I need to retrieve aggregate information (by means of SUM) on the basis of two separate dates – created_at and erased_at. The requirement is as follows: Column Description Month Month as YYYY-MM …

Why are my Hibernate `select` queries super slow?

I am using Hibernate in my Java based REST API. I am using HQL mainly because it is easy. Also for this project, I am loading data from the main table, its associated tables, their associated tables …