{"text_format":"1","workbook":"xlsx","n_sheets":1,"sheets":["Queries"],"not_rendered":{"charts":0,"images":0,"macros":1,"external_links":0,"defined_names":5,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Queries","index":0,"n_rows":24,"n_cols":2,"rows_kept":24,"cut":false,"hidden":false,"merged":[]}
["Breeze Excel Query"]
[]
["Enter the details of your Spire server and company database."]
["Select a row from the query list and hit Ctrl-Shift-Q to create the query."]
["You will be asked for the Postgres user ID and password once when the query is first created."]
["Common user IDs used are \"spireapp\" or \"postgres\""]
[]
["Password protect this sheet if data is sensitive."]
[]
["Once you have created queries and modified them to your needs, you can update all your queries to point to a new server\\port\\settings with Ctrl-Shift-U"]
["Useful if you are developing something on test data or will be moving this to another server to deploy."]
[]
["Server","localhost"]
["Port",5432]
["Database","INSPIRE"]
[]
["Name","SQL"]
["Inventory-AllFields","SELECT * FROM inventory"]
["Customer-Arrays","SELECT cust_no,name,this_year_sales[1],this_year_sales[2],this_year_sales[3] FROM customers"]
["Inventory-UDF","SELECT whse,part_no,(udf_data ->> 'Kosher')::boolean as Kosher,(udf_data ->> 'expirydate')::date as ExpiryDate, udf_data ->> 'StoreTemp' as StoreTemp FROM inventory"]
["ContactsFormatPhone","SELECT name,email,phone as RawPhone, format_phone_number(phone) as NicePhone FROM address_contacts"]
["CustomerBillTo-Linked","SELECT c.cust_no, c.name, a.address[1] as Address1, a.city,a.prov_state,a.postal_zip FROM customers AS c INNER JOIN addresses AS a ON c.cust_no = a.link_no WHERE a.link_table = 'CUST' AND a.addr_type = 'B'"]
["AR-AgedFunction-With Date","SELECT * FROM ar_aged_list('2022-10-01')"]
["CustomersV3(ReportVersion)","SELECT * FROM v3.customers"]