Find Jobs
Hire Freelancers

Advanced SQL Query Help - SQL Server

$30-100 USD

In Progress
Posted over 12 years ago

$30-100 USD

Paid on delivery
I am developing a service provisioning system and need to pull some data out of my database. I am reasonably proficient in SQL however the exact query I need to get this data is beyond me! I have a table of 'customer services' - services a customer has subscribed to. I need to calculate (on the fly) which 'package' this combination of services relates to. I have another table which associates each service with one or more packages (and hence defines several packages containing different combinations of services) It is a design requirement that this 'package' is computed on the fly - rather than stored and updated - as there are several applications which will modify the 'services' a customer has active at any one time - and we only control the source code of one of these applications. I already have the query working correctly in so far as it will return the correct package(s) a customer effectively has, based on the services they have active. However, there is an additional criteria I need to build into this query. Each 'service' assigned to a customer also has a number of licences assigned to it. A 'package' of services can ONLY be considered to be a package if the customer has the same number of licences for each service within that package. If they have different numbers of licences, then they are not considered to have that package - and will instead have a combination of other, smaller packages. I can explain this in more detail and give you access to a replica of the database if you think you can help. Seeing the output (and query) I already have should give you a good understanding of the requirements and hopefully make things clearer than my explanation. I'm looking for a quick turnaround on this - ideally within 24-48 hours. I would imagine an expert in SQL could have this resolved in a very short time indeed. Just to be clear - this is MS SQL Server, not MySQL, etc. The query is already relatively complex however will only need to be run once a month, so performance (whilst desirable) is not a significant consideration. I am open to the potential to slight modifications to the structure of the database (although I do not believe they will be necessary) however it is important that the package(s) are calculated at runtime, not stored against the customer in a separate table.
Project ID: 3724707

About the project

4 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$1 USD in 2 days
5.0 (3 reviews)
1.6
1.6
4 freelancers are bidding on average $34 USD for this job
User Avatar
See private message.
$34 USD in 2 days
4.7 (79 reviews)
5.3
5.3
User Avatar
See private message.
$50.15 USD in 2 days
5.0 (29 reviews)
4.4
4.4
User Avatar
See private message.
$50.15 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED KINGDOM
Newton Abbot, United Kingdom
5.0
2
Member since Dec 3, 2010

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.