SQL Reference
Window Aggregate Functions
window functions operate on a set of rows and return a single value for each row from the underlying query like aggregate functions, window functions operate on a set of rows, but they do not reduce the number of rows returned by the query unlike regular aggregate functions, window functions do not group rows into a single output row instead, the rows retain their separate identities, and the window function produces aggregate calculations that access more than just the current row in the query result the term window describes the set of rows on which the window function operates a window function returns a value from the rows in a window the database uses the order by and partition by clauses to define the scope of the window syntax window aggregate functions follow this syntax with window function representing any of the functions listed in /#supported window aggregate functions window function( arg1, arg2 \[, ] \[ ignore nulls ] ) over ( \[ partition by part list ] \[ order by order list \[ asc | desc ] \[ nulls first | nulls last ] ] \[ \<rows or range clause> ] ) \<rows or range clause> = { rows | range } { \<window frame preceding> \| between { \<window frame preceding> | \<window frame following> } and { \<window frame preceding> | \<window frame following> } } \<window frame preceding> = { unbounded preceding | row integer preceding | current row } \<window frame following> = { unbounded following | row integer following | current row } parameter data type description arg1, arg2 \[, ] string the arguments of the window function the arguments depend on the type of window function part list s tring s pecifies the column by which the rows are partitioned for the window function order list string specifies the column by which the rows are ordered row integer numeric an integer representing the number of rows to operate from the current row window aggregate keywords window aggregate functions use these clauses and keywords to designate the parameters for the query and output partition by this clause defines a set of rows within a result set partition by operates similarly to a docid\ qcf0x9ao4a56x id39pkr clause, except it does not reduce the number of rows in the result set order by sorts the result set in ascending or descending order based on one or more specified columns an order by clause must be included on all window functions to ensure your query results are deterministic some window functions require an order by clause see the syntax for each function for specifics for details, see docid\ qcf0x9ao4a56x id39pkr asc or desc specifies whether the values in the specified column should be sorted in asc ascending or desc descending order asc is the default sort order nulls first, nulls last, or ignore nulls specifies if the database sorts null rows first nulls first , last nulls last , or whether the database ignores nulls ignore nulls the default is nulls last rows or range limit the rows within the partition by specifying start and end points within the partition specify a range of rows with respect to the current row by logical association using range or physical association using rows t he range clause logically limits the rows within a partition by specifying a range of values with respect to the value in the current row the system defines preceding or following rows based on the ordering in the order by clause if you do not specify this clause, the default is ascending order the rows clause limits the rows within a partition by specifying a fixed number of rows preceding or following the current row specifying a window frame by the range keyword with the current row current row keyword includes all rows with the same values as the current row in the order by clause rows and range clauses can include these options keyword clause description unbounded preceding specifies that the window starts at the first row of the partition this clause specifies a window starting point only unbounded following specifies that the window ends at the last row of the partition this clause specifies a window endpoint only for example range between current row and unbounded following this window frame starts with the current row and ends with the last row of the partition row integer preceding the row integer value specifies the number of rows or values to precede the current row you cannot use the preceding keyword in a range clause row integer following the row integer value specifies the number of rows or values to follow the current row when you specify the following keyword as the window starting point, the endpoint must also use a following clause with a row value for example rows between 2 following and 10 following this window frame starts with the second row following the current row and ends with the tenth row following the current row you cannot use the following keyword in a range clause current row when you specify the current row keyword in a rows clause, the window frame starts or ends at the current row when y ou specify this keyword in a range clause, the window frame includes all rows with equal values for example rows between 2 preceding and current row this clause means that the window function operates on a frame of three rows in size, where the first two rows precede the current row (inclusive) you can specify the current row as either a starting or end point supported window aggregate functions these functions are supported for window frames some examples use the sys dummy virtual table to populate data for details, see docid\ xh 8jfelifhxgjnei ffy you cannot use the distinct keyword with window aggregation functions cume dist returns a positive value less than one that represents a percentage of values that are less than or equal to the current value in the group syntax cume dist () over ( \[ partition by part list ] order by order list ) parameter data type description part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function example this example shows the cumulative distribution values for a table with generated numbers from one to 10 select x, cume dist() over (order by x) as d from (select c1 as x from sys dummy10); output \| "x" | "d" | \| | | \| 1 | 0 1 | \| 2 | 0 2 | \| 3 | 0 3 | \| 4 | 0 4 | \| 5 | 0 5 | \| 6 | 0 6 | \| 7 | 0 7 | \| 8 | 0 8 | \| 9 | 0 9 | \| 10 | 1 0 | delta computes the finite difference between successive values of expression under the specified ordering this is a backward difference, meaning the delta value for a specified row is the difference between the value of that row and the previous row the function requires two rows of input data to calculate a first degree difference, three rows of input data to calculate a second degree difference, and so on however, rather than returning null for the first few rows, the function returns the correct values, such that using delta of degree n followed by delta of degree n cancel each other out to return the initial result (other than floating point error accumulation) in general, using this window function over larger result sets with large degrees worsens floating point error accumulation integer degree values in the range \[ 3, 3] are generally stable up to approximately 5 million rows fractional degree values in the range \[ 3, 3] are generally stable up to approximately 1 million rows the stable degree range is wider over smaller result sets and narrower over larger result sets for example, fractional and integer degrees are stable over the range \[ 4, 4] up to approximately 80,000 rows the function treats any null values in the input data as zero, which might cause unexpected results filter out null values before you use the window function syntax delta ( expression \[, degree ]) over ( \[ partition by expr list ] order by order list ) parameter data type description expression numeric the column or expression to use for the delta calculation degree numeric o ptional if degree is set to a positive integer greater than 1, the window function calculates the higher order finite difference without using nested delta calls if negative, the calculation is an anti difference (i e , discrete integration) you can specify fractional values, either positive or negative, and these values mean fractional differences or sums the default is 1 part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function examples calculate difference values using basic numbers this example shows the delta values for a table with generated numbers from one to 10 select y, delta(y, 1) over (order by y) as d from (select double(c1 c1) as y from sys dummy10); output \| "y" | "d" | \| | | \| 1 | 1 | \| 4 | 3 | \| 9 | 5 | \| 16 | 7 | \| 25 | 9 | \| 36 | 11 | \| 49 | 13 | \| 64 | 15 | \| 81 | 17 | \| 100 | 19 | calculate difference values using partitioned sales data this example uses the delta function with a table of regional sales data to find the difference in sales by region and year select region, year, sales amount, delta(sales amount) over (partition by region order by year) as sales delta from regional sales order by region, year; output \| "region" | "year" | "sales amount" | "sales delta" | \| | | | | \| north | 2018 | 12000 | 12000 | \| north | 2019 | 15000 | 3000 | \| north | 2020 | 17000 | 2000 | \| north | 2021 | 16000 | 1000 | \| north | 2022 | 18000 | 2000 | \| south | 2018 | 10000 | 10000 | \| south | 2019 | 14000 | 4000 | \| south | 2020 | 15000 | 1000 | \| south | 2021 | 17000 | 2000 | \| south | 2022 | 16000 | 1000 | dense rank assigns a rank to each row in the result set with equal values having the same number there are no gaps between ranks syntax dense rank () over ( \[ partition by part list ] order by expr list ) parameter data type description part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function example this example generates the rank for a series of ten random numbers use the docid\ e2c2vckzh8dfsbp1wngpr function to generate the random numbers with randomnumbers as ( select rand() as num from sys dummy10 ) select num, dense rank() over (order by num) as n from randomnumbers; output \| num | n | \| | | \| 0 021744504292815926 | 1 | \| 0 11531389663905277 | 2 | \| 0 17818297230968436 | 3 | \| 0 3009914646699445 | 4 | \| 0 366713904443239 | 5 | \| 0 7801256114813641 | 6 | \| 0 8735727062571587 | 7 | \| 0 8969752860565523 | 8 | \| 0 9679736914744647 | 9 | \| 0 9910291449541664 | 10 | derivative the function calculates the difference between successive values of two numeric expressions, representing a backward difference (e g , the difference between the current and previous row) it can be considered as computing the derivative of one expression with respect to another the function must use an order by clause, and it cannot use a partition by clause derivative requires two arguments, expression and expression2 , which must be included in the order by clause the function computes the difference in expression values between consecutive rows and divides this by the difference in expression2 values over the same rows if expression represents some measured value and expression2 is time, the result is the rate of change (derivative) of the value with respect to time the function can compute higher degree derivatives (second, third, etc ) to calculate the nth degree derivative, it uses a backward difference formula that compares the current row to the previous n rows for example a second degree derivative requires three rows of data the current row, the previous row, and the one before the previous row a third degree derivative would require four rows, and so on unlike some functions that return null for rows that lack sufficient preceding data, the derivative function is designed to return correct values even for initial rows this behavior ensures that if you apply a derivative of degree n followed by its inverse (derivative of degree n ), you recover the original values with minimal error (except for floating point inaccuracies) in general, using this function over larger result sets with larger degrees worsens the floating point error integer degree values in the range of three are generally stable up to approximately 5 million rows fractional degree values in the range of three are generally stable up to approximately 1 million rows the stable degree range is wider over smaller result sets and narrower over larger result sets for example, fractional and integer degrees are stable over the range \[ 4, 4] up to approximately 80,000 rows for higher order calls, the sample points for expression must be equally spaced, or the function might return incorrect results in other words, the delta executions between consecutive expression2 values must always be the same if this is not true, use some form of interpolation to create an evenly spaced series of samples before you use the window function the function treats any null values in the input data for either expression or expression2 arguments as zero, which might cause unexpected results filter out null values before you use the window function syntax derivative ( expression \[, degree ] ) over ( order by expression2 ) parameter data type description expression numeric the column or expression to use for the derivative calculation compared to expression2 expression2 numeric the column or expression to use for the derivative calculation compared to expression degree numeric o ptional if you set degree to a positive integer greater than one, the window function calculates the higher order difference quotients (discrete derivatives) without using nested derivative executions if the degree argument is a negative integer, the calculation is a discrete anti differentiation or integration the default value is 1 examples calculate the derivative using basic numbers this example shows the derivative values for a basic table with values x and y select x, y, derivative(y, 1) over (order by x) as d from (select double(2 x + 1) as y, x from (select c1/2 0 as x from sys dummy10)); output \| "x" | "y" | "d" | \| | | | \| 0 5 | 2 0 | 4 0 | \| 1 0 | 3 0 | 2 0 | \| 1 5 | 4 0 | 2 0 | \| 2 0 | 5 0 | 2 0 | \| 2 5 | 6 0 | 2 0 | \| 3 0 | 7 0 | 2 0 | \| 3 5 | 8 0 | 2 0 | \| 4 0 | 9 0 | 2 0 | \| 4 5 | 10 0 | 2 0 | \| 5 0 | 11 0 | 2 0 | calculate the antiderivative using a negative degree this example uses a negative degree to produce an antiderivative select x, y, derivative(y, 1) over (order by x) as d from (select double(2 x + 1) as y, x from (select c1/2 0 as x from sys dummy10)); output \| "x" | "y" | "d" | \| | | | \| 0 5 | 2 0 | 1 0 | \| 1 0 | 3 0 | 2 5 | \| 1 5 | 4 0 | 4 5 | \| 2 0 | 5 0 | 7 0 | \| 2 5 | 6 0 | 10 0 | \| 3 0 | 7 0 | 13 5 | \| 3 5 | 8 0 | 17 5 | \| 4 0 | 9 0 | 22 0 | \| 4 5 | 10 0 | 27 0 | \| 5 0 | 11 0 | 32 5 | first value returns the first value in the ordered result set syntax first value ( expression ) over ( \[ partition by p list ] \[ order by order list ] ) parameter data type description expression any the column or expression value to use for the first value calculation part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function example this example uses a table with generated numbers from one to 10 of this group, the function determines the first value from the ordering select y, first value(y) over (order by y) as first value from (select c1 as y from sys dummy10); output \| "y" | "first value" | \| | | \| 1 | 1 | \| 2 | 1 | \| 3 | 1 | \| 4 | 1 | \| 5 | 1 | \| 6 | 1 | \| 7 | 1 | \| 8 | 1 | \| 9 | 1 | \| 10 | 1 | lag returns a row backward from the current row (one row back unless you specify a different number value) syntax lag (value expr \[, offset ]) over ( \[ partition by part list ] \[ order by order list ] ) parameter data type description value expr any the column or expression to use for the lag calculation offset numeric optional this number determines how many rows back from the current row from which to return a value the default value is 1 part list any the column or expression value to use for the lag calculation order list any specifies the column by which the rows are ordered for the window function examples calculate lag using basic numbers this example uses a table with generated numbers from one to 10 of this group, the lag function returns the last value for the specified column y select y, lag(y) over (order by y) as wf from (select c1 as y from sys dummy10); output \| "y" | "wf" | \| | | \| 1 | | \| 2 | 1 | \| 3 | 2 | \| 4 | 3 | \| 5 | 4 | \| 6 | 5 | \| 7 | 6 | \| 8 | 7 | \| 9 | 8 | \| 10 | 9 | calculate lag using an offset in this example, the offset value 5 changes the number of rows back from the current row from which to return a value select y, lag(y, 5) over (order by y) as wf from (select c1 as y from sys dummy10); output \| "y" | "wf" | \| | | \| 1 | | \| 2 | | \| 3 | | \| 4 | | \| 5 | | \| 6 | 1 | \| 7 | 2 | \| 8 | 3 | \| 9 | 4 | \| 10 | 5 | last value returns the last value in the ordered result set syntax last value ( expression ) over ( \[ partition by part list ] \[ order by order list ] ) parameter data type description expression any the column or expression value to use for the last value calculation part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function example this example uses a table with generated numbers from one to 10 of this group, the function determines the last value from the ordering select y, last value(y) over (order by y) as last value from (select c1 as y from sys dummy10); output \| "y" | "last value" | \| | | \| 1 | 1 | \| 2 | 2 | \| 3 | 3 | \| 4 | 4 | \| 5 | 5 | \| 6 | 6 | \| 7 | 7 | \| 8 | 8 | \| 9 | 9 | \| 10 | 10 | lead returns a row forward from the current row (one row forward unless you specify a different number value) syntax lead (value expr \[, offset ]) over ( \[ partition by part list ] \[ order by order list ] ) parameter data type description value expr any the value to use for the lead calculation offset numeric optional this number determines how many rows forward from the current row to return a value the default value is 1 part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function examples calculate the lead value using basic numbers this example uses a table with generated numbers from one to 10 of this group, the lead function returns the last value for the specified column y select y, lead(y) over (order by y) as lead value from (select c1 as y from sys dummy10); output \| "y" | "lead value" | \| | | \| 1 | 2 | \| 2 | 3 | \| 3 | 4 | \| 4 | 5 | \| 5 | 6 | \| 6 | 7 | \| 7 | 8 | \| 8 | 9 | \| 9 | 10 | \| 10 | | calculate the lead value using an offset in this example, using a table of generated numbers with values from one to 10, specify the offset value 5 in the lead function to change the number of rows forward from the current row to return a value select y, lead(y, 5) over (order by y) as lead value from (select c1 as y from sys dummy10); output \| "y" | "lead value" | \| | | \| 1 | 6 | \| 2 | 7 | \| 3 | 8 | \| 4 | 9 | \| 5 | 10 | \| 6 | | \| 7 | | \| 8 | | \| 9 | | \| 10 | | nth value returns the n th value in the ordered result set syntax nth value (expr, offset) over ( \[ partition by part list ] \[ order by order list ] ) parameter data type description expr any the column or expression from which to retrieve a value offset numeric a positive integer that indicates the row number, starting from the first row in the window this integer must be positive part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function examples calculate the fifth value using bounded rows this example uses a table with generated numbers from one to 10 of this group, the nth value function returns the fifth value for the specified column y for the first four rows, the window contains fewer than five rows, so the function returns null because the fifth value is not yet available select y, nth value(y, 5) over (order by y) as nth from (select c1 as y from sys dummy10); output \| "y" | "nth" | \| | | \| 1 | | \| 2 | | \| 3 | | \| 4 | | \| 5 | 5 | \| 6 | 5 | \| 7 | 5 | \| 8 | 5 | \| 9 | 5 | \| 10 | 5 | calculate the fifth value using unbounded rows to include future rows in the window frame, you can modify the window frame as shown in this example select y, nth value(y, 5) 	over ( order by y rows between unbounded preceding and unbounded following) as nth from 	(select c1 as y from sys dummy10); output \| "y" | "nth" | \| | | \| 1 | 5 | \| 2 | 5 | \| 3 | 5 | \| 4 | 5 | \| 5 | 5 | \| 6 | 5 | \| 7 | 5 | \| 8 | 5 | \| 9 | 5 | \| 10 | 5 | percentile returns the value corresponding to the specified percentile (0 ≤ n ≤ 1) within the group the set of values is treated as a continuous distribution, so it is possible that the computed value can not appear in the result set syntax percentile (expr, percentile) over ( \[ partition by part list ] \[ order by order list ] ) parameter data type description expr any the column or expression to use for the percentile calculation percentile float a percentile ( 0 ≤ n ≤ 1) to determine the value to return by its position within the ordering of expr part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function example this example finds the value at approximately 90 percent of the range of the expression values for the source data, use a table of generated numbers from one to 10 the value returns 9 1 because the window column starts at 1 it would be 9 if the column started at 0 select y, percentile(y, 0 9) over (order by y) as percentile value from (select c1 as y from sys dummy10); output \| "y" | "percentile value" | \| | | \| 1 | 9 1 | \| 2 | 9 1 | \| 3 | 9 1 | \| 4 | 9 1 | \| 5 | 9 1 | \| 6 | 9 1 | \| 7 | 9 1 | \| 8 | 9 1 | \| 9 | 9 1 | \| 10 | 9 1 | percent rank returns a percentage value for each row representing the percentage of values less than the current group, excluding the highest value the highest value in a group is always 1 syntax percent rank () over ( \[ partition by expr list ] order by order list ) example this example generates the percent rank of the table with ten generated numbers from one to 10 select y, percent rank() over (order by y) as percent rank from (select c1 as y from sys dummy10); output \| "y" | "percent rank" | \| | | \| 1 | 0 0 | \| 2 | 0 1111111111111111 | \| 3 | 0 2222222222222222 | \| 4 | 0 3333333333333333 | \| 5 | 0 4444444444444444 | \| 6 | 0 5555555555555556 | \| 7 | 0 6666666666666666 | \| 8 | 0 7777777777777778 | \| 9 | 0 8888888888888888 | \| 10 | 1 0 | rank assigns a rank number to each row in the result set with equal values having the same number there can be gaps between ranks results are similar to the ranking used in sporting events syntax rank () over ( \[ partition by expr list ] order by order list ) parameter data type description part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function example this example ranks a series of ten random numbers use the docid\ e2c2vckzh8dfsbp1wngpr function to generate the random numbers with randomnumbers as ( select rand() as num from sys dummy10 ) select num, rank() over (order by num) as n from randomnumbers; output \| num | n | \| | | \| 0 0003210869634629 | 1 | \| 0 03250125317575761 | 2 | \| 0 09413438896602266 | 3 | \| 0 130728439355569 | 4 | \| 0 376078282337459 | 5 | \| 0 5049826734614208 | 6 | \| 0 5642048500743658 | 7 | \| 0 5989180494879046 | 8 | \| 0 9077625673606013 | 9 | \| 0 9428422123895421 | 10 | ratio to report computes the ratio of a value to the sum of the set of values for example, the ratio to report function calculates the ratio of the salary of an employee relative to the total salaries in the department where the employee belongs syntax ratio to report ( ratio expression ) over ( \[ partition by part list ] \[ order by order list ] ) parameter data type description ratio expression numeric a column or expression to calculate the ratio for each row compared to the total part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function example this example shows a ratio of each salary of an individual employee to the total salaries select name, salaries, ratio to report(salaries) over (order by salaries) as ratio from salaries; output \| name | salaries | ratio | \| | | | \| vasquez, gustav | 70000 0 | 0 08484848484848485 | \| ho, chen | 75000 0 | 0 09090909090909091 | \| kiwi, marie | 110000 0 | 0 13333333333333333 | \| smith, roberts | 140000 0 | 0 1696969696969697 | \| porter, polly | 180000 0 | 0 21818181818181817 | \| svenson, olaf | 250000 0 | 0 30303030303030304 | row number assigns a unique number to each row in the result set syntax row number () over ( \[ partition by part list ] \[ order by order list ] ) parameter data type description part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function examples determine the unique number of each row in a table this example assigns a row number to a basic table of fruit prices based on the price order select fruit, price, row number() over (order by price) as row no from fruits; output \| "fruit" | "price" |"row no"| \| | | | \| banana | 0 5 | 1 | \| kiwi | 0 75 | 2 | \| orange | 1 5 | 3 | \| mango | 1 75 | 4 | \| apple | 1 99 | 5 | \| strawberry | 3 99 | 6 | determine the unique number of each row using a partitioned table this example uses a table of sales data for two regions the row number function orders the sales team members by their region and sales amounts select salesperson, region, sales amount, sum(sales amount) over (partition by region) as total sales by region, row number() over (partition by region order by sales amount desc) as sales rank in region from sales; output \| "salesperson" | "region" | "sales amount" | "total sales by region" | "sales rank in region" | \| | | | | | \| eve | north | 2500 | 5000 | 1 | \| bob | north | 1500 | 5000 | 2 | \| alice | north | 1000 | 5000 | 3 | \| dave | south | 3000 | 5000 | 1 | \| carol | south | 2000 | 5000 | 2 | zscore calculates the z score of the sample based on the standard deviation (similar to the docid\ qtfpyds4dv4jap2 s6v g aggregate function) the standard deviation assumes that the data is a sample of a larger set, meaning it corrects for bias if your data set is comprehensive and represents an entire group, use the /#zscorep function instead syntax zscore (expr) over ( \[ partition by part list ] \[ order by order list ] ) parameter data type description expr numeric a column or expression to calculate the standard deviation for each row part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function example this example calculates the standard deviation in a range of salaries select name, salaries, zscore(salaries) over (order by salaries) as std dev from salaries; output \| name | salaries | std dev | \| | | | \| vasquez, gustav | 70000 0 | | \| ho, chen | 75000 0 | 0 7071076862849652 | \| kiwi, marie | 110000 0 | 1 1470789011835154 | \| smith, roberts | 140000 0 | 1 2593337909146212 | \| porter, polly | 180000 0 | 1 4100478781464227 | \| svenson, olaf | 250000 0 | 1 634473657490547 | zscorep calculates the z score of the sample based on the population standard deviation (similar to the docid\ qtfpyds4dv4jap2 s6v g aggregate function) the population standard deviation assumes that the data contains the entire population, meaning there is no correction for bias use it when your data set is comprehensive and represents the entire group (i e population) you are analyzing if your data set is a sample of a larger set, use the /#zscore function syntax zscorep (expr) over ( \[ partition by part list ] \[ order by order list ] ) parameter data type description expr numeric a column or expression to calculate the standard deviation for each row part list any s pecifies the column by which the rows are partitioned for the window function order list any specifies the column by which the rows are ordered for the window function example this example calculates the population standard deviation in a range of salaries select name, salaries, zscorep(salaries) over (order by salaries) as std devp from salaries; output \| name | salaries | std devp | \| | | | \| vasquez, gustav | 70000 0 | | \| ho, chen | 75000 0 | 1 0000012800024576 | \| kiwi, marie | 110000 0 | 1 4048790013060097 | \| smith, roberts | 140000 0 | 1 4541534063682966 | \| porter, polly | 180000 0 | 1 5764814535323706 | \| svenson, olaf | 250000 0 | 1 7904761837110903 | related links docid\ e2c2vckzh8dfsbp1wngpr docid\ qcf0x9ao4a56x id39pkr docid\ xh 8jfelifhxgjnei ffy