|
2021년 1월부터 기존 파일 형식을 더 이상 사용할 수 없습니다. 기존 파일을 전환하거나 PDF를 다운로드할 수 있습니다. 자세히 알아보기

Calculation and presentation in Query

0

댓글

댓글 1개

  • Isabel Messore

    Peter Stienstra,

    Two options here:
     
    1. The easiest is to use the SUM CASE WHEN syntax to call out what to aggregate in a given column. For example,
    • SUM CASE
    • WHEN (1) = 'Apples' AND (2) = 'NL' THEN (3)
    • ELSE 0 END
    • (1 being 'product' column, 2 being 'country' column, 3 being 'sales' column)
    • And call the column in builder mode whatever you want it called. You can reference this as resource for available syntax: https://prestodb.io/docs/current/sql.html
    2. You could potentially use cross-tab function and filters to get to a specific end result but you can't choose in which order to display the content (like you can in calculations)
     
    Hope this helps!
    -1

댓글을 남기려면 로그인하세요.