MySQL Forums
Forum List  »  Newbie

data between loginc
Posted by: Amara Suman
Date: March 28, 2014 07:15AM

Hi All,

I have table JobOrader it has 5 columns
like (jo_no, jo_type, jo_release, jo_date, jo_livedate)

Using mysql i am counting the jo_type like below

select jo_no,jo_date,jo_livedate,count(*) from joborder
where job_no='1232';

output:-
-------

|jo_no------jo_date------jo_livedate----count(*) |
|-----------------------------------------------------------|
|1232------01-dec-14----05-dec-14--------5 |
|-----------------------------------------------------------|

I want output of different of jo_date and jo_livedate is 5 day i need to generate 5 records as below ...

|--------------------------------------------------------|
|jo_no------date----------count(*) |
|1232------01-dec-14-----------5 |
|1232------02-dec-14-----------5 |
|1232------03-dec-14-----------5 |
|1232------04-dec-14-----------5 |
|1232------05-dec-14-----------5 |
|--------------------------------------------------------|

Options: ReplyQuote


Subject
Written By
Posted
data between loginc
March 28, 2014 07:15AM
March 31, 2014 12:09PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.