Performs DBSCAN clustering on a group of GEOGRAPHY values and
produces a 0-based cluster number for this row.
For more information, see Geography functions.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eGoogleSQL for BigQuery supports a variety of window functions, enabling complex data analysis within defined subsets of rows.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCUME_DIST\u003c/code\u003e, \u003ccode\u003eDENSE_RANK\u003c/code\u003e, \u003ccode\u003eNTILE\u003c/code\u003e, \u003ccode\u003ePERCENT_RANK\u003c/code\u003e, \u003ccode\u003eRANK\u003c/code\u003e, and \u003ccode\u003eROW_NUMBER\u003c/code\u003e functions are available for numbering and ranking rows within a window, as detailed in the Numbering functions documentation.\u003c/p\u003e\n"],["\u003cp\u003eFunctions such as \u003ccode\u003eFIRST_VALUE\u003c/code\u003e, \u003ccode\u003eLAST_VALUE\u003c/code\u003e, \u003ccode\u003eLAG\u003c/code\u003e, \u003ccode\u003eLEAD\u003c/code\u003e, \u003ccode\u003eNTH_VALUE\u003c/code\u003e, \u003ccode\u003ePERCENTILE_CONT\u003c/code\u003e, and \u003ccode\u003ePERCENTILE_DISC\u003c/code\u003e can be used to navigate and retrieve values from different positions within a window frame, as seen in the Navigation functions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eST_CLUSTERDBSCAN\u003c/code\u003e is another supported window function, facilitating clustering of GEOGRAPHY values, and its specifics can be found in the Geography functions documentation.\u003c/p\u003e\n"]]],[],null,["# Window functions\n\nGoogleSQL for BigQuery supports the following\n[window functions](/bigquery/docs/reference/standard-sql/window-function-calls).\n\nFunction list\n-------------"]]