Home > database >  Oracle simple query
Oracle simple query

Time:09-25



Please see the topic request to do O (studying studying) O

CodePudding user response:

- the picture is not clear, the sales
 
Select the name,
The SUM (decode (actually, the 'language', score, 0)) Chinese,
The SUM (decode (running 'mathematics', score, 0)) mathematics,
The SUM (decode (actually, 'English' score, 0)) English
The from t
Group by name

CodePudding user response:

Students with poor grades a, eager to study, point in a look, and the results haven't read a morning

CodePudding user response:

Basic line conversion
 select name, 
The SUM (decode (actually, the 'language', score, 'null')) Chinese,
The SUM (decode (running 'mathematics', score,' null ')) mathematics,
The SUM (decode (actually, 'English' score, 'null')) English
The from t
Group by name

CodePudding user response:

Select the name,
The SUM (decode (actually, the 'language', score, 'null')) Chinese,
The SUM (decode (running 'mathematics', score,' null ')) mathematics,
The SUM (decode (actually, 'English' score, 'null')) English
The from orade
Group by the name

CodePudding user response:

Learning, DECODE function

CodePudding user response:

This figure to see I was drunk

CodePudding user response:



Quotes on null values.

CodePudding user response:

There's no quotes on null values

CodePudding user response:

CodePudding user response:

Look at the picture I dizzy don't see don't see don't see

CodePudding user response:

Who said that won't do, is certainly not personally written SQL to try, that you this learning is very passive

CodePudding user response:

The most basic SQL query, simple relational query!

CodePudding user response:

 select name, 
The SUM (decode (course, yuwen, score, 0)) 'yuwen,
The SUM (decode (actually, 'shuxue, score, 0)) shuxue,
The SUM (decode (actually, 'yingyu, score, 0)) yingyu
The from grate
Group by name


  • Related