Can someone please tell me how to solve this question? And the thought process – like how do you think while solving this. It is driving me crazy. š Question – The attendance table logs the number of people counted in a crowd each day an event is held. Write a query to return a table showing the dā¦
Tag: oracle
Split column value by semicolon into individual rows based on another column’s value
I need to generate rows based on the quantity value. The barcode column will have value separate by semicolon “;” I want to turn each separated value into individual column. If the barcode value is less than the quantity, other rows of barcode column will be null. The barcode value will not be morā¦
Oracle Apex – Case within a where statement
I’m having issues while running the following query (interactive report / simplified the query cause I’m sure the issue is with the case statement): The error is this one: ORA-20999. Does someone know why this is happening? (:p28 items are calculated via computations and work perfectly) Thanks! Anā¦
How to combine 4 sql queries into a single query with good performance?
I have a problem to solve. First I split this problem into parts and so I wrote four queries separately but now I need to put them together as if it were a single call to return a single result. How can I do this? 1) I select purchases according to branch and store 2) I validate if the promotional
Display group having certain value only on max date and not in other entries of group
I am looking to display the group which is grouped on id column where trans_cd=’Audit’ only on max trans_proc_dt of that group. There should not be any other trans_cd=’Audit’ execpt for max trans_proc_dt. My output should be I can’t think how to go about getting my result set. Anā¦
How can I alter data type and datas in it, numbers separated with comma
I have table , that has field named AMOUNT , amount takes number, table has 1.4m records, i need to upgrade them all . I would like the change NUMBER to varchar and make look like amount datas comma separated , eg: 76543-> 76,543. How can I able to do it? Answer i need to upgrade them all Don’t; if
How to distribute stock quantity from a single cell to different aging brackets based on the the aging brackets quantities?
We have a table with item codes and current stock quantity and quantities in aging brackets whenever they were received (1-90, 91-120, etc) as follows: I need to distribute the STOCK_AS_ON_DATE quantity in the age brackets until no balance quantity is left. Example: Item A’s STOCK_AS_ON_DATE is 40377, iā¦
SQL not using ALIAS column for calculation
Question Statement – From the given trips and users tables for a taxi service, write a query to return the cancellation rate in the first two days in October, rounded to two decimal places, for trips not involving banned riders or drivers. Question code on Oracle SQL. My Solution Code is below. However,ā¦
Using NVL with JOIN
I want to display 2 values in table but only Student 301 is displayed. Student 102 doesn’t received any grades. I joined two tables. Here’s my query. Thanks for your help Answer Presumably, both students are in enrollment_info. If so, you can use: Note the use of LEFT JOIN. The table where you wanā¦
‘WITH’ clause does not work with in operator
I have a simple query: It should create a MaxSal temporary table and then in the WHERE section it should check whether the Salary, DepId are inside said table. Unfortunately, this query gives me ORA-00920: invalid relational operator which I guess is referring to the in operator. If I put the Sub-query directā¦