Skip to content

Advanced AmiScript 1: Tables and AMI SQL

This first tutorial in the series will introduce the concept of the Table data type and how it differs to the data types we have previously covered in the AMI Script tutorial series. We will explore both the structure of the table and how to add and retrieve data from a table. We will then start to cover the AMI SQL SELECT Statement, first looking at how it can retrieve data. Once we can select data from a Table object we will look at how to pick specific columns and rename those columns in the result set. A common requirement is to be able to filter and sort the data we return which we will achieve using the WHERE clause for filtering and ORDER BY for sorting. While we could do all of our data analysis using AMI Script, AMI SQL has a number of aggregation functions that can provide us with powerful summary statistics and values, quickly and easily. Finally, we will solve the same problem using both an AMI SQL approach and a pure AMI Script approach. We will compare the solutions before looking at how we can use the result of a SELECT Statement in our AMI Script.

  • Topics Covered


    Table Objects:

    • Table structure
    • Adding, retrieving and removing data
    • Answering a business question
  • Topics Covered continued...


    AMI SQL SELECT Statement:

    • Selecting and renaming columns
    • WHERE clause
    • ORDER BY
    • Aggregation Functions
    • SQL vs non SQL approaches
    • Using results in AMI Script