Build MySql queries
$30-250 CAD
Pagado a la entrega
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.
Nº del proyecto: #8206277
Sobre el proyecto
13 freelancers están ofertando un promedio de $101 por este trabajo
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
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 Más
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 .