I would like to make next query: Desired result: when row selected by LAG function (number 12 in partition) match condition currentRow.F2 = rowSele ...
I would like to make next query: Desired result: when row selected by LAG function (number 12 in partition) match condition currentRow.F2 = rowSele ...
Let's say i have a table with Users : user_id abc def And a table of Purchases ...
I have the following query: With this result: Query result I want the column min_sal_by_dept_and_job to exclude X percent of the sal column. Let's ...
I have a table of receiving events by item and branch (skul) and I'm trying to pull only the most recent receipt date for each skul. I'm having troubl ...
I am using Oracle DB Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production I have the following create table script. I want to ...
I have a requirement to fetch previous row or lag records where there are some missing previous ids. Database : Oracle 12c Example data: ...
I would like to access the value of the "current row" on which I write the analytic expression on. For example, given the following sample data: Le ...
I am trying to use dense_rank to get element order for instance: I have table seq_test with data: after I run the code above, I've got : I want ...
I have a table contains the info of the access time and movements for each employee. Some employees have shift work hours between two days, I have co ...
My table (name EPM1): TIMESTAMP INVERTER1POWER INVERTER2POWER POWERLIMIT 2021-09-30T17:19:42. ...
I have a sample dataset given as follows; Quick explanation; first column gives time of transaction, second column gives difference with next row t ...
I have a table with the fields ORDER and FLAG as below and I want to create the GRP column using analytic functions. Can someone adivse how I can do t ...
is there an analog to SQL analytic so that one could do aggregation without collapsing rows? For example, I want to do a sum for each group without GR ...
I have the following table and from there I want to add another column with the previous value: id Previous id Value ...
My actual problem involves a larger row source and more involved math, but this is a small example that still exhibits the challenge faced. Using Orac ...
My query returns many (thousands of) rows. Column l has certain value for very small amount of rows (up to 10). For each such row I want to output agg ...
I have dates and some value, I would like to sum values within 7-day cycle starting from the first date. this is my input data with 4 groups to see ...
I guess my question could be answered with an Oracle analytic function in the SQL but I am not to sure. Say I have the following "DOCUMENTS" DB Table: ...
I need to Count all Rows and write it into Columns in ORACLE SQL. It schould look like that (left as it is, right as it should look like): I've tri ...
Data Model: Hi, I am trying to get "country with the highest number of tests". Query: I tried using one table.. ok... but how I get it with "coun ...