Skip to content

SQL Select Statement – Automation Anywhere

I am trying to write an SQL select statement where i only extract two columns from a csv which has been connected as a CSV. The select statement query i am using is: Which extracts all data in the table as expected, I wish to only extract data in columns with headers: The below line of code throws a syntax

Return Data based on Column

I am modifying a current query which returns n amount of rows. I would need to return the same amount of rows but with one more column of data. I have two sql tables shown below. Products and Product Attribute Values. When i run this query i get a few 1000 rows back. But when i run this query I

Having problem with Select using month/hour

The database is from a Hospital and the problem is when the month changes, like this: The patient gets to the UTI on the date 30/03/2020 6AM and left on 02/04/2020 11AM so theoretically they spend (18+…

Counting rows with a window function

Each customer can have one or multiple accounts (account_id). To find customer churn, all accounts attached to a customer must be closed, i.e. having closed_date e.g. here customer churn is 2. How can …