I have the below data set: NAME 2012 2013 2014 2015 2016 2017 2018 2019 JOHN 180 185 192 205 199 198 …
Tag: oracle
How to not return result if one value is null?
There is a top level weight for a shipment but within that there is several weights for handling units. If one of these handling units has no value then I want the shipment to not show up in my query….
how to use an if statement in update query in Oracle
I wanted to use if statement in Oracle update. Below is the condition that i wanted to achieve and i will not be able to use PL/SQL. I wanted to achieve the below result using update statement. if …
SQL: How to write multiple interactive scripts in one query (insert rows)
Simple question- I just want to learn how to write a query that will insert 2 rows into my table by writing one query, instead of 2 separate ones. My queries work completely fine, I just want to know …
Finding Duplicate Rows in a Table
I am trying to find out how many duplicate records I have in a table. I can use count, but I’m not sure how best to eliminate records where the count is only 1. I can try to order by the count, but I am still not eliminating those with a count of one. Answer you can use having clause
What is the difference between count (*) and count(attribute_name)?
Is there any difference between COUNT(*) and COUNT(attribute_name)? I used count(attribute_name) as I thought that it would be specific hence the searching process would be easier. Is that true? It would be great to see any example with sql code with my issue to help me understand better Answer Imagine this t…
SQL statement about average
My question is -> Retrieve the segment ID and length of each segment that is longer than the average length of all segments. Name the column indicating the length of segments “Length”. Relations: What I got so far is: And I got this error message: Error: Your query has syntax errors. Descriptio…
SQL (Oracle) – Select where record does not exist or another column in the 2nd table is true
Applications-Table ——————— ID FIRST_NAME LAST_NAME APPLICATION_TYPE STATUS_TYPE 123 JOHN SMITH EDUCATION …
error when I try to activate my code navicat 12
I have an error when I try to activate my code. and I do not know what’s the solution. This is my error : error navicat I had already followed youtube videos to activate navicat 12 and I managed …
Create View based on join of column name and table value of two tables
I got two tables. and a second The resulting View I need would look like this: I only managed to get it done with one column combined with a where clause: I would probably need some command which loop through the column names and joins column names with the values in the attribute column, because the real tab…