Build MySql queries

Ολοκληρωμένο Αναρτήθηκε Aug 4, 2015 Πληρώθηκε κατά την παράδοση
Ολοκληρωμένο Πληρώθηκε κατά την παράδοση

I have 3 tables

## Users

`user_id` | `subscription_date`

--:|:--

1 | 2015-07-10

2 | 2015-07-15

3 | 2015-07-17

## Courses

`course_id` | `name`

1 | Course A

2 | Course B

## Orders

`order_id`  | `user_id` | `purchased_course_id` | `purchased_other_thing1` | `order_status`

--:|--:|--:|--:|--:

1 | 2 | 0 | 1 | paid

2 | 2 | 1 | 0 | paid

3 | 3 | 0 | 1 | failed

4 | 3 | 2 | 1 | paid

For each user subscribed, and for each courses, I want to know when the user has not paid for the course and for how long since he subscribed.

(today is 2015-07-20)

Result

`user_id` | `course_id` | `unpaid_days`

1 | 1 | 10 (user 1 has never paid course 2)

1 | 2 | 10 (user 1 has never paid course 1)

2 | 1 | NULL (user 2 has paid, null ok 0 is ok)

2 | 2 | 5 (user 2 has not paid course 2)

3 | 1 | 3 (user 3 has not paid course 1)

3 | 2 | NULL (user 3 has paid course 2)

I have this one for now, and maybe others.

MySQL PHP Αρχιτεκτονική Λογισμικού

Ταυτότητα Εργασίας: #8206277

Σχετικά με την εργασία

13 προτάσεις Απομακρυσμένη εργασία Ενεργό Aug 4, 2015

Ανατέθηκε στον:

PHPCody

Hello , I am interested to work with you on your posted job .i can send you query in next 1 hour .I am able to finish this job with your [login to view URL] me for further communication Waiting for your positive respo Περισσότερα

$50 CAD σε 1 μέρα
(13 Αξιολογήσεις)
5.2

13 freelancers κάνουν προσφορές κατά μέσο όρο $101 για αυτή τη δουλειά

Fahomid

Hi, It seems to be an easy task for me. I'm expert in PHP and SQL. I've my own website where I manage all my databases all by myself. I have wide experience. I can complete this task within next 24 hours. Please Περισσότερα

$88 CAD σε 1 μέρα
(51 Αξιολογήσεις)
7.4
ferozstk

Hello, Thank you very much for this MySql Project. I read through the job details extremely carefully and understand your required, for this I am absolutely sure that I can do the project very well. I can complete th Περισσότερα

$50 CAD σε 1 μέρα
(79 Αξιολογήσεις)
6.3
bhaskarmandal

Hi, I am 5 years experienced web developer expert in MySQl . I have understand your point . I can complete this within two hours . Please check my profile for my work quality . Thanks, Bhaskar Mandal

$88 CAD σε 0 μέρες
(77 Αξιολογήσεις)
6.0
angnut

hi,i can work tomorrow on this job.

$88 CAD σε 1 μέρα
(14 Αξιολογήσεις)
4.4
lostaNK

Hello Sir, We are a group of students and designers on IT Services from Serbia and we would like to cooperate with You on your project. We have done a lot of projects like this for our Faculty and it is not somethi Περισσότερα

$40 CAD σε 3 μέρες
(4 Αξιολογήσεις)
1.8
mackowenandrew

I can assure you that I can offer my drive and passion towards excellence. I make sure that I excel in everything I do and meet and/or surpass what is expected from me. I am very much committed to any task at hand and Περισσότερα

$45 CAD σε 0 μέρες
(2 Αξιολογήσεις)
1.6
silmerpaz

Hi, Im an IT architect / senior developer with more of 15 years experienced. PHP/.Net specialist (Framework 2.0 certified). web specialist (HTML5/CSS3/Javascript). Web Designer

$111 CAD σε 3 μέρες
(1 Κριτική)
0.6
abdullahmehr

sir you will have the quires i have two things quality of work and time limit with 2 year experience in .net desktop applications

$155 CAD σε 3 μέρες
(0 Αξιολογήσεις)
0.0
phpdevelopian

I have much of knowledge in MySQL queries. I have making this tyoe of query many times so please give me this job .

$100 CAD σε 1 μέρα
(0 Αξιολογήσεις)
0.0
sojiaye1984

A proposal has not yet been provided

$155 CAD σε 3 μέρες
(0 Αξιολογήσεις)
0.0