Skip to content

Oracle Optimize Query

i’m working with oracle pl/sql and i have a stored procedure with this query, and it is a bit convoluted, but it gets the job done, the thing is it takes like 35 minutes, and the sql developer Autotrace says that is doing a full scan even though the tables have their indexes. So is there any way to impr…

SQL count row where progres not done

Need some help, dont know the keyword of this problem to search online I want to count some progres that isn’t done when progres has step3 then its not counted desired result from that example is 2, im trying to do it alone, and it doesnt work help is needed, Thanks Ahead Answer One method uses count(di…

MySQL Running Total By Group, Time Interval

I would like to take a table of customer orders like this: And create a table calculating a cumulative running total by week, segmenting the weeks by 7 days starting at the earliest date (2020-03-01, 2020-03-08, etc.). Something like: Thanks for the help! Answer You can use aggregation and window functions (t…

Oracle slow join with view

I’m using the following query to find a monetary transaction for a person. SELECT PERSON.NAME, MONETARY_TRANSACTION.DESCRIPTION FROM PERSON LEFT JOIN MONETARY_TRANSACTION ON PERSON.ID = …