AVGAVG( [ DISTINCT | ALL ] <field_expr> )Returns the average among all the values, or only the DISTINCT values, of the specified field-expression.Type: aggregate
BIT_ANDBIT_AND( arg1 <INTEGER>, arg2 <INTEGER> )Calculates the bitwise AND of two values.Type: arithmetical
CASECASE <field_expression> WHEN <field_expression> THEN <field_expression> [ ... ] [ ELSE <field_expression> ] ENDCompares the argument of the CASE statement with the arguments of the WHEN statements, returning the argument of a THEN statement when a match is found. If no match is found, returns the argument of the ELSE statement, or NULL if no ELSE statement is provided.Type: miscellaneous
COALESCECOALESCE( arg1 <any type>, arg2 <any type> [, ....] )Returns the first non-NULL value among its arguments.Type: miscellaneous
COMPUTER_NAMECOMPUTER_NAME()Returns the NetBIOS name of the local computer.Type: system information
COUNTCOUNT( [ DISTINCT | ALL ] * ) | ( [ DISTINCT | ALL ] <field_expr_list> )Returns the number of items in a group.Type: aggregate
COUNT(DISTINCT cs-uri-stem) AS [Distinct Requests] Returns a count of how many distinct files were requested.
DIVDIV( dividend <INTEGER | REAL>, divisor <INTEGER | REAL> )Calculates the quotient of two values.Type: arithmetical
DIV(sc-bytes, 1024) AS [KB Sent] Converts bytes sent from the server to the client to Kilobytes (KB).
DIV(DIV(sc-bytes, 1024), 1024) AS [MB Sent] Converts bytes sent from the server to the client to Megabytes (MB).
EXTRACT_PREFIXEXTRACT_PREFIX( argument <STRING>, index <INTEGER>, separator <STRING> )Returns a substring beginning at the first character and up to, but not including, the specified instance of the separator.Type: string manipulation
EXTRACT_SUFFIXEXTRACT_SUFFIX( argument <STRING>, index <INTEGER>, separator <STRING> )Returns a substring beginning after the specified instance of the separator and up to the end of the string.Type: string manipulation
EXTRACT_TOKENEXTRACT_TOKEN( argument <STRING>, index <INTEGER> [ , separator <STRING> ] )Splits the string into substrings at each point where the separator occurs, and returns the substring with the specified index.Type: string manipulation
EXTRACT_TOKEN(cs(Referer), 2, '/') AS [Referring Domain] Returns full domain of the site referring traffic to this resource.
EXTRACT_VALUEEXTRACT_VALUE( argument <STRING>, key <STRING> [ , separator <STRING> ] )Parses "key=value" pairs in the string, returning the value corresponding to the specified key.Type: string manipulation
GROUPINGGROUPING( <field_expr> )Returns a value of 1 when the row is added by the ROLLUP operator of the GROUP BY clause, or 0 when the row is not the result of ROLLUP. GROUPING is used to distinguish the NULL values returned by ROLLUP from standard NULL values. The NULL returned as the result of a ROLLUP operation is a special use of NULL. It acts as a value placeholder in the result set and means "all".Type: aggregate
HASHMD5_FILEHASHMD5_FILE( filePath <STRING> )Calculates the MD5 hash of the content of a file and returns its hexadecimal representation.Type: miscellaneous
HASHSEQHASHSEQ( value <STRING> )Returns a unique, sequential integer for each distinct value of the argument.Type: miscellaneous
HEX_TO_ASCHEX_TO_ASC( hexString <STRING> )Converts the hexadecimal representation of a series of bytes into a string where the bytes belonging to the 0x20-0x7F range have been converted to ASCII characters.Type: string manipulation
HEX_TO_HEX16HEX_TO_HEX16( hexString <STRING> [ , bigEndian <INTEGER> ] )Converts the hexadecimal representation of a series of bytes into another hexadecimal representation in which bytes are grouped into 16-bit WORDs.Type: string manipulation
HEX_TO_HEX32HEX_TO_HEX32( hexString <STRING> [ , bigEndian <INTEGER> ] )Converts the hexadecimal representation of a series of bytes into another hexadecimal representation in which bytes are grouped into 32-bit DWORDs.Type: string manipulation
HEX_TO_HEX8HEX_TO_HEX8( hexString <STRING> )Converts the hexadecimal representation of a series of bytes into another hexadecimal representation in which bytes are grouped into 8-bit octets.Type: string manipulation
HEX_TO_PRINTHEX_TO_PRINT( hexString <STRING> )Converts the hexadecimal representation of a series of bytes into a string where the bytes corresponding to printable ASCII characters have been converted to the characters themselves.Type: string manipulation
INDEX_OFINDEX_OF( string <STRING>, searchStr <STRING> )Returns the character position where the first occurrence of a search substring occurs in a string.Type: string manipulation
LAST_INDEX_OFLAST_INDEX_OF( string <STRING>, searchStr <STRING> )Returns the character position where the last occurrence of a search substring occurs in a string.Type: string manipulation
MODMOD( dividend <INTEGER | REAL>, divisor <INTEGER | REAL> )Calculates the remainder of the division of two numbers.Type: arithmetical
MULMUL( multiplicand <INTEGER | REAL>, multiplier <INTEGER | REAL> )Calculates the product of two values.Type: arithmetical
MUL(PROPCOUNT(*), 100) When used with another field and a simple GROUP BY, returns the percentage of requests by that field. See example query HTTP status codes and percentage of total.
PROPCOUNTPROPCOUNT( * ) [ ON ( <on_field_expr_list> ) ] | ( <field_expr_list> ) [ ON ( <on_field_expr_list> ) ]Returns the ratio of the COUNT aggregate function calculated on a group to the COUNT aggregate function calculated on a hierarchically higher group.Type: aggregate
PROPSUMPROPSUM( <field_expr> ) [ ON ( <on_field_expr_list> ) ]Returns the ratio of the SUM aggregate function calculated on a group to the SUM aggregate function calculated on a hierarchically higher group.Type: aggregate
QNTFLOOR_TO_DIGITQNTFLOOR_TO_DIGIT( value <INTEGER>, digits <INTEGER> )Truncates a number to a specified number of significant digits, masking the remaining digits to zero.Type: arithmetical
QNTROUND_TO_DIGITQNTROUND_TO_DIGIT( value <INTEGER>, digits <INTEGER> )Rounds a number to a specified number of significant digits, masking the remaining digits to zero.Type: arithmetical
QUANTIZEQUANTIZE( argument <INTEGER | REAL | TIMESTAMP>, quantization <INTEGER | REAL> )Truncates a value to the nearest multiple of another value.Type: arithmetical
QUANTIZE(TO_TIMESTAMP(date, time), 3600) Returns date/times to the hour. (In other words, drops the minutes.)
REPLACE_CHRREPLACE_CHR( string <STRING>, searchCharacters <STRING>, replaceString <STRING> )Replaces each occurrence of a character in a given set of characters with a string.Type: string manipulation
REPLACE_IF_NOT_NULLREPLACE_IF_NOT_NULL( argument <any type>, replaceValue <any type> )Returns the second argument when the first argument is not NULL, and NULL otherwise.Type: miscellaneous
REPLACE_STRREPLACE_STR( string <STRING>, searchString <STRING>, replaceString <STRING> )Replaces each occurrence of a substring with a string.Type: string manipulation
RESOLVE_SIDRESOLVE_SID( sid <STRING> [ , computerName <STRING> ] )Resolves a SID and returns its full account name.Type: system information
REVERSEDNSREVERSEDNS( ipAddress <STRING> )Resolves an IP address and returns the corresponding host name.Type: system information
REVERSEDNS(c-ip) Returns the host name for the client's IP address.
ROT13ROT13( string <STRING> )Encodes or decodes a string using the ROT13 algorithm.Type: string manipulation
ROUNDROUND( argument <REAL> )Returns the integer closest to the specified argument.Type: arithmetical
SEQUENCESEQUENCE( [ startValue <INTEGER> ] )Returns a unique sequential integer associated with the current input record number.Type: miscellaneous
SQRSQR( argument <INTEGER | REAL> )Calculates the square of the specified argument.Type: arithmetical
SQRROOTSQRROOT( argument <INTEGER | REAL> )Calculates the square root of the specified argument.Type: arithmetical
STRCATSTRCAT( string1 <STRING>, string2 <STRING> )Appends one string to another.Type: string manipulation
STRCNTSTRCNT( string <STRING>, token <STRING> )Returns the number of occurrences of a substring in a string.Type: string manipulation
STRCNT(cs-uri-stem, '/') AS [Request Depth] Returns the depth of a requested file.
STRLENSTRLEN( string <STRING> )Returns the length of a string.Type: string manipulation
STRREPEATSTRREPEAT( string <STRING>, count <INTEGER> )Creates a string by repeating a substring a given number of times.Type: string manipulation
STRREVSTRREV( string <STRING> )Reverses the characters in a string.Type: string manipulation
SUBSUB( minuend <any type>, subtrahend <any type> )Calculates the difference of two values.Type: arithmetical
TO_DATE(SUB(TO_LOCALTIME(SYSTEM_TIMESTAMP()), TIMESTAMP('0000-01-08', 'yyyy-MM-dd'))) Gets the date seven days ago, based on the current local date/time.
SUBSTRSUBSTR( string <STRING>, start <INTEGER> [ , length <INTEGER> ])Returns a substring beginning at a specified location and having a specified length. The <start> of <string> begins at 0.Type: string manipulation
SUMSUM( [ DISTINCT | ALL ] <field_expr> )Returns the sum of all the values, or only the DISTINCT values, of the specified field-expression.Type: aggregate
SUM(sc-bytes) AS [Total Bytes Sent] Returns the total number of bytes sent from the server to the client.
SYSTEM_DATESYSTEM_DATE()Returns the current system date in Universal Time Coordinates (UTC) time.Type: system information
SYSTEM_UTCOFFSETSYSTEM_UTCOFFSET()Returns the current system timezone and daylight saving offset relative to Universal Time Coordinates (UTC) time.Type: system information
TO_DATETO_DATE( timestamp <TIMESTAMP> )Converts a full timestamp into a date-only timestamp.Type: conversion
TO_REALTO_REAL( argument <any type> )Converts a value of the INTEGER, STRING, or TIMESTAMP data type into a value of the REAL data type.Type: conversion
TO_STRINGTO_STRING( argument <INTEGER | REAL> ) | ( timestamp <TIMESTAMP>, format <STRING> )Converts a value of the REAL or INTEGER data type into a value of the STRING data type.Type: conversion
TO_STRING(TO_LOCALTIME(TO_TIMESTAMP(date, time)), 'yyyy-MM-dd') AS [Day] Converts the date and time of a request to local time, and then outputs the day as a string (2010-03-22).
TO_TIMETO_TIME( timestamp <TIMESTAMP> )Converts a full timestamp into a time-only timestamp.Type: conversion
TO_TIME(TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time), 3600))) AS [Hour] Create a timestamp from the date and time of a request, drops the minutes from the time, converts it to local time, and pulls just the time.
TO_TIMESTAMPTO_TIMESTAMP( dateTime1 <TIMESTAMP>, dateTime2 <TIMESTAMP> ) | ( string <STRING>, format <STRING> ) ( seconds <INTEGER | REAL> )Parses a string representing a timestamp and returns a value of the TIMESTAMP data type. See also Microsoft Log Parser timestamp formats by James Skemp. There seems to be no difference between using TO_TIMESTAMP() and just TIMESTAMP().Type: conversion
TO_TIMESTAMP(date, time) Converts the date and time of a request into a timestamp, for use with other functions.
TO_TIMESTAMP('2009-02-06', 'yyyy-MM-dd') Creates a timestamp of the date February 6, 2009.
TO_TIMESTAMP('2010-02-15 10:15', 'yyyy-MM-dd HH:mm') Creates a timestamp of February 25, 2010, at 10:15 in the morning.
TO_UPPERCASETO_UPPERCASE( string <STRING> )Returns a string where all alphabetic characters have been converted to uppercase.Type: string manipulation
URLESCAPEURLESCAPE( url <STRING> [ , codepage <INTEGER> ] )Converts a string to the URL-encoded form suitable for transmission as an HTTP query string.Type: string manipulation
WIN32_ERROR_DESCRIPTIONWIN32_ERROR_DESCRIPTION( win32ErrorCode <INTEGER> )Returns the text message associated with a numeric Windows error code.Type: miscellaneous