Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use User Session Query Alias


Hi community,

i want to write this User Session Query:

SELECT, COUNT(errorCount) from useraction WHERE name="name-of-useraction" GROUP BY It's work, but i must change the useraction's name (only in this query, i can't change the real name). I tried some like this query, withuot success:

SELECT, COUNT(errorCount) from useraction WHERE name="name-of-useraction" AS "name-changed" GROUP BY

The AS command doesn't work in this case, so how can i change my useraction's name in this query?



Dynatrace Guru
Dynatrace Guru

The alias goes in the select part not the where clause:

select name as "New Name", count(errorCount) from useraction where name="name-of-useraction" group by name

Hi James, i can use this query: SELECT AS "new name", COUNT(errorCount) from useraction WHERE name="old name" GROUP BY and it's work, but doesn't change the useraction's name.

There is another way?

Oh I see the misunderstanding, you're not changing the name itself by doing an alias. You're changing the column name (i.e. what shows up in the column header in a table). I don't believe you can just rename the action like that outside of the funnel function.

Depending on what you're trying to do I'd just leave off the action name and use either an alias on the error count field or just the usql query name to specify what you'd like to refer to the action as:

I'm trying to execute this query in Bar Chart visualization (because i need to it):

When i upload query into the tile, i can't see full name, but only "Loading of page..." because it's cropped. So, i must use the alias command to write a shorter name.

Thanks for your help

DynaMight Legend
DynaMight Legend

Changing the Name of Columns is not supported at this time. I Spent some time looking for any way that we could adjust the name, even support looked into it and concluded that it was not possible at this time.


Thank you Chad for your answer

DynaMight Legend
DynaMight Legend

You're very welcome


Featured Posts