Skip to content

Tag: oracle

Shapiro-Wilk test

In PL/SQL, I want to calculate the Shapiro-Wilk value of my selected data. Apparently, the function DBMS_STAT_FUNCS.normal_dist_fit is able to do it, but it takes a table name as a parameter, and not the result of a select. The values I am working with are numbers, selected after many inner joins. Here is a s…

Row lumping, cycle dates

I want to look at the lead type and if that type is the same for that row then merge in those dates to fit within one row. I have the below table: Expected Results: How can I get my output to look like the expected results? I have tested withlead lag rank and case expression but nothing worthy of

Perform counting for lookup in SQL

I would like to perform lookup based on the number of Yes in Input. In ID No.1, Output1 is A because it is first Yes, Output2 is B because it is second Yes. In ID No.2, Output1 is blank because Input1 is n/a, subsequent output is based on number of Yes appeared. In ID No.3, it shows counting is skipped