Fix and Simplify SQL Statements

Closed - This job posting has been filled and work has been completed.
Web, Mobile & Software Dev Web Development Posted 2 years ago

Fixed Price

Delivery by December 2, 2013




This python scripts connects to a postgresql database and retrieves file names for two mutually exclusive alternatives:

- video (if its video, its got to retrieve 3 things (videoname.m4v, videoname.mp4 and videoname.webm)

- picture (if its picture, its got to retrieve 2 things (imagename and imageduration)

Currently this is being done in two separate queries, I want to join them and fix them because there are some rules:
1. server id 0 applies to all servers
2. server id >= applies to an specific server
3. a promo created for an specific server has priority over the "all servers id (0)"
4. The last promo created for an specific server is the one that applies to it

About the Client

(5.00) 3 reviews

United States
Miami 10:26 PM

4 Jobs Posted
75% Hire Rate, 1 Open Job

$125 Total Spent
3 Hires, 0 Active

$20.00/hr Avg Hourly Rate Paid
1 Hour

Member Since Apr 5, 2013