Skip to content

Instantly share code, notes, and snippets.

@bkmorse
Created October 18, 2013 20:52
Show Gist options
  • Select an option

  • Save bkmorse/7048112 to your computer and use it in GitHub Desktop.

Select an option

Save bkmorse/7048112 to your computer and use it in GitHub Desktop.
pcc013 entries
select
r.id as user_id, r.first_name, r.last_name, r.address, r.city, r.state, r.zip, r.country, r.phone, r.email, e.title as celebration, d.name as destination, c.name as celebration_theme, e.ship_name, e.story, e.likes, e.status, e.potential_winner, e.princess_produced, e.image1, e.image2, e.image3, e.image4, e.image4, e.image5, e.video, e.video_thumb, r.created_at as date_registered
from
destination d
left join
entries e on d.id = e.destination
left join
registrations r on e.reg_id = r.id
left join
celebrations c on e.celebration_theme = c.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment