--- title: Locations table description: "Shopify Data Warehouse documentation: Locations table." source_url: html: https://shopify.dev/docs/apps/build/data-warehouse/reference/schema/locations md: https://shopify.dev/docs/apps/build/data-warehouse/reference/schema/locations.md --- # Locations table The locations table contains metrics about your Shopify Point of Sale (POS). You can use this table to generate a list of the Shopify POS locations or you can join the table with the [sales](https://shopify.dev/docs/apps/build/data-warehouse/reference/schema/sales) table to measure sales performance. This table contains one row per Shopify POS location. ### Columns | Column | Data type | Description | | - | - | - | | location\_id | numeric | The ID of the Shopify POS. This column is the **primary key** for the locations table. The location\_id is null for orders not placed through Shopify POS, such as those placed through the online store. | | [shop\_id](https://shopify.dev/docs/apps/build/data-warehouse/reference/schema/shops#shop_id) | numeric | The ID of the store. This column is a **foreign key** reference to the shop\_id column in the [shops](https://shopify.dev/docs/apps/build/data-warehouse/reference/schema/shops#shop_id) table. | | name | varchar | Name of the POS location as provided by the merchant. For example, 150 Elgin Street or Downtown Boutique. | ### Examples The following SQL query returns Shopify POS data by staff member: ```SQL SELECT (users.first_name || ' ' || users.last_name) AS user_name, SUM(total_sales) AS total_sales, SUM(returns) AS returns, (CASE WHEN SUM(total_sales) > 0 THEN 1.0 * SUM(returns) / SUM(total_sales) END) AS returns_ratio FROM shopify.sales LEFT JOIN shopify.api_clients ON sales.api_client_id = api_clients.api_client_id LEFT JOIN shopify.users ON sales.user_id = users.user_id WHERE api_clients.title = 'Point of Sale' GROUP BY 1 ORDER BY 2 DESC; ``` ***