![]() Drag and drop order date to rows and avg profit to the mark labels Select a range How to retrieve: Which days have an average profit greater than 500? – End the query by adding a semi-colon at the end ![]() If not specified the sorting is automatically done Ascending – ORDER BY the measure using the alias created and sort either by ASC or DESC. If where it is followed by IN or = it filters the chosen field. – SELECT all the fields with squared bracket and rename the aliases with AS Add a new step to filter the Central region: = ‘CENTRAL’ Add an aggregate step to group by product name and region with sum of sales Drag and drop Region to filter and select Central region only Drag and drop product name to rows and sum of sales to columns ![]() It is possible to add comments or title to the queries by typing: /* INSERT COMMENT */įilter a field How to retrieve: Sales by product name for the Central Region When selecting a field name, only that data field is retrieved as shown in the second example. Second step: specify the data source FROM and run the query by clicking on the green arrow pointing right A few things to remember is that SQL language is not case sensitive and there is a specific order of operation to follow.įirst step: insert the SELECT followed by the desired field name in squared brackets or just write star to retrieve all field This article aims at explaining the fundamentals of the SQL language to retrieve data and it also shows some examples on how to do it in Tableau and Tableau prep as well. SQL or Structured Query language is a domain-specific language used in programming and designed for managing data held in a relational database management system, or for stream processing in a relational data stream management system. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |