Click here to Skip to main content
15,899,624 members
Home / Discussions / Database
   

Database

 
QuestionRe: Display data only from search parameters Pin
CHill6023-May-17 10:52
mveCHill6023-May-17 10:52 
AnswerRe: Display data only from search parameters Pin
rattlerrFx23-May-17 13:21
rattlerrFx23-May-17 13:21 
GeneralRe: Display data only from search parameters Pin
CHill6024-May-17 1:06
mveCHill6024-May-17 1:06 
QuestionTeam Please help on the below request Pin
ganesh_naganna23-May-17 0:55
ganesh_naganna23-May-17 0:55 
AnswerRe: Team Please help on the below request Pin
Mycroft Holmes23-May-17 14:55
professionalMycroft Holmes23-May-17 14:55 
QuestionSQL for dynamic mappings Pin
Danpeking22-May-17 3:13
Danpeking22-May-17 3:13 
QuestionRe: SQL for dynamic mappings Pin
CHill6022-May-17 4:19
mveCHill6022-May-17 4:19 
AnswerRe: SQL for dynamic mappings Pin
Danpeking22-May-17 4:30
Danpeking22-May-17 4:30 
AnswerRe: SQL for dynamic mappings Pin
CHill6022-May-17 4:27
mveCHill6022-May-17 4:27 
GeneralRe: SQL for dynamic mappings Pin
Danpeking22-May-17 4:36
Danpeking22-May-17 4:36 
GeneralRe: SQL for dynamic mappings Pin
CHill6022-May-17 4:39
mveCHill6022-May-17 4:39 
GeneralRe: SQL for dynamic mappings Pin
Danpeking22-May-17 5:46
Danpeking22-May-17 5:46 
AnswerRe: SQL for dynamic mappings Pin
Danpeking24-May-17 23:28
Danpeking24-May-17 23:28 
GeneralMessage Closed Pin
18-May-17 20:29
Member 1321003518-May-17 20:29 
GeneralRe: oracle fusion procurement Pin
Richard MacCutchan18-May-17 21:49
mveRichard MacCutchan18-May-17 21:49 
GeneralRe: oracle fusion procurement Pin
CHill6018-May-17 22:24
mveCHill6018-May-17 22:24 
GeneralRe: oracle fusion procurement Pin
Richard MacCutchan18-May-17 22:35
mveRichard MacCutchan18-May-17 22:35 
QuestionRun sql query inside a stored procedure Pin
Member 1320472716-May-17 9:29
Member 1320472716-May-17 9:29 
QuestionRe: Run sql query inside a stored procedure Pin
ZurdoDev16-May-17 10:13
professionalZurdoDev16-May-17 10:13 
AnswerRe: Run sql query inside a stored procedure Pin
Kornfeld Eliyahu Peter16-May-17 21:21
professionalKornfeld Eliyahu Peter16-May-17 21:21 
SuggestionRe: Run sql query inside a stored procedure Pin
Richard Deeming17-May-17 1:25
mveRichard Deeming17-May-17 1:25 
QuestionGet sum of column base on equality of values of one row From previous generate request( using SELECT and EXTRACT) Pin
Mostafazs14-May-17 20:35
Mostafazs14-May-17 20:35 
Hello
I can't find solution for this simple query.Want to get sum of column of VISIT_FEE that have colum MONTH_ 2 and YEAR_ 1396

My main table is like this:
ID VISIT_DATE  VISIT_TIME  VISIT_FEE   IS_PAY
1   13960124    10:00           300000          1
6   13960208    10:50           2500000         1
7   13960208    11:00           210000          1
8   13960209    10:20           300000          1

and now i use below query:
SELECT
VISIT_FEE,
    EXTRACT(YEAR FROM VISIT_DATE) AS YEAR_,
    EXTRACT(MONTH FROM VISIT_DATE) AS MONTH_,
EXTRACT(DAY FROM VISIT_DATE) AS DAY_

FROM
    MZS_VISIT_REQUEST
WHERE
    IS_PAY = 1

and result is :
VISIT_FEE  YEAR_   MONTH_  DAY_
300000         1396 1   1
2500000        1396 2   2
210000         1396 2   2
300000         1396 2   2

And now i want some of colum VISIT_FEE that have YEAR_ 1396 and MONTH_ 2 and 1
somethings like below table:
FEE    YEAR_   MONTH_  DAY_
300000         1396 1   1
3010000        1396 2   2

Thanks.

modified 15-May-17 23:40pm.

AnswerRe: Get sum of column base on equality of values of one row From previous generate request( using SELECT and EXTRACT) Pin
Maciej Los14-May-17 21:18
mveMaciej Los14-May-17 21:18 
GeneralRe: Get sum of column base on equality of values of one row From previous generate request( using SELECT and EXTRACT) Pin
Mostafazs15-May-17 17:40
Mostafazs15-May-17 17:40 
AnswerRe: Get sum of column base on equality of values of one row From previous generate request( using SELECT and EXTRACT) Pin
Maciej Los15-May-17 20:03
mveMaciej Los15-May-17 20:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.