Oracle Query not Working [closed] - sql

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
oracle query is not working. Please specify what is wrong in this query?
(select hacker_id,challenge_id, max(score) as soc
from submissions
group by hacker_id,challenge_id
having max(score)>0) t2;

Please read #OldProgrammer comments. Anyway, I think this should work for you
select hacker_id,challenge_id, max(score) as soc
from submissions
group by hacker_id,challenge_id
having max(score)>0;

Related

How to compare data in SQL [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have an application which is taking data from questionnaires users are completing on a website and inputting this into a SQL Lite database.
I'm using Django and would like to display data of users who match closest by selecting similar answers.
How could this be done?
You can add multiple join conditions like this
SELECT *
FROM <table>
INNER JOIN <same table different name>
ON (condition1 OR condition2 OR condition3)

SQL Server - Select [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Please, how do I SELECT, to get the result column?
columns
SELECT machine, software
FROM ms_tbl
INNER JOIN machine_tbl
ON machine_tbl.machine_id = ms_tbl.machine_id
INNER JOIN software_tbl
ON software_tbl.software_id = ms_tbl.software_id;

SQL code does not work [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
How can i write a code that i want to choose name and adress of a customer which customer_id is bigger than him. Thank you very much.
select c.name,a.adress,a.postcode_id from customer c left join Adress a on c.customer_id=a.customer_id where c.customer_id>11
SELECT cs.name,ad.adress
FROM Customer cs, Adress ad
WHERE cs.customer_id=ad.customer_id
AND cs.customer_id>11;

Optimization of for loop in oracle [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I was asked on my apprenticeship following question:
Why query like:
FOR i in ( SELECT * FROM TABELKA) LOOP
is not efficient? How to change it to make it more efficient?
There is no further information added.
Collect, all data at once, into a collection. Boom! One query and you have it all without looping.
SELECT *
BULK COLLECT INTO a_collection_type_variable
FROM a_table;

Need to replace a part of a value in Sql Server 2005 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
My table name is SOFTSKILL. One of Columns is MakeID. The values in the column are,
000277755
000278143
000277738
000277051
i need to change 000 into 100, like
100277755
100278143
100277738
100277051
Anybody please help me how to do this..
UPDATE SOFTSKILL
SET MakeId = STUFF(MakeId,1,1,'1')
WHERE MakeId LIKE '000%'