Build MySql queries
$30-250 CAD
Πληρώθηκε κατά την παράδοση
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.
Ταυτότητα Εργασίας: #8206277
Σχετικά με την εργασία
Ανατέθηκε στον:
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 Περισσότερα
13 freelancers κάνουν προσφορές κατά μέσο όρο $101 για αυτή τη δουλειά
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 Περισσότερα
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 Περισσότερα
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
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 Περισσότερα
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 Περισσότερα
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
sir you will have the quires i have two things quality of work and time limit with 2 year experience in .net desktop applications
I have much of knowledge in MySQL queries. I have making this tyoe of query many times so please give me this job .