Jump to content

jonnytekno

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jonnytekno

  • Rank
    Newbie
  1. Hi there - I am not massively proficient at SQL so get stuck with a few things My source data contains orders (hotel bookings actually): each row has a date, value of the booking, and some other attributes e.g. channel booked through, which hotel it was etc I want to create a table where the first column is the date (or actually the month but I can do that easily) but then it has 3 columns, each of which sums the revenue/booking value BUT in each column the selection criteria is different. For example, in column a) I only want to show the revenue for direct bookings; in column b) I want to show the revenue for travel agent bookings; in column c) I want to show all the revenue. I found a few other things about this where people were suggesting using CASE statements, but that only seems to work for counting unless I have missed something Any help much appreciated
×