Distinct values is a feature that stores unique string values of a column. It essentially run the following SQL:
SELECT DISTINCT <column_name> FROM <table_name> LIMIT 50
It is useful when you have a column with a limited number of unique values, such as a column with country names or product categories. By storing unique values, distinct values can improve the accuracy of your model and reduce the memory usage.
Currently the maximum number of distinct values that can be stored is 50.
If a user asks what is the average salary of software engineers in the U.S.?, the AI model may generate the following SQLAI-generated SQL without distinct values:
SELECT * FROM salariesWHERE country = 'U.S.'
The AI model may not be aware that ‘U.S.’ and ‘United States’ are the same
country. As a result, the query may not return the correct results.
AI-generated SQL with distinct values:
SELECT * FROM salariesWHERE country = 'United States'
By using distinct values, the AI model improves the accuracy of the where
clause.
Was this page helpful?
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Brewit Docs","colors":{"primary":"#181A1F","light":"#ffffff","dark":"#181A1F"},"favicon":"/favicon.svg","logo":{"light":"https://mintcdn.com/brewit-84/pyjAYulKSUrvhjf5/logo/light.svg?fit=max\u0026auto=format\u0026n=pyjAYulKSUrvhjf5\u0026q=85\u0026s=e14ed380b5703ff67bbedc6c9839cb6b","dark":"https://mintcdn.com/brewit-84/pyjAYulKSUrvhjf5/logo/dark.svg?fit=max\u0026auto=format\u0026n=pyjAYulKSUrvhjf5\u0026q=85\u0026s=ee40cec934e79a9c79f8db6bc111880f","href":"https://brewit.ai"},"api":{"openapi":["api-reference/auth-openapi.json"],"playground":{"display":"simple"}},"appearance":{"default":"light","strict":null},"navbar":{"links":[{"label":"Support","href":"mailto:leo@brewit.ai"}],"primary":{"type":"button","label":"Get Started","href":"https://app.brewit.ai/"}},"footer":{"socials":{"twitter":"https://twitter.com/BrewitAI","linkedin":"https://www.linkedin.com/company/brewit","slack":"https://join.slack.com/t/brewit-workspace/shared_invite/zt-269etu3mb-Mjxl2bG0SxTrhrvceeFPxA"}},"navigation":{"global":{"anchors":[{"anchor":"Community","href":"https://join.slack.com/t/brewit-workspace/shared_invite/zt-269etu3mb-Mjxl2bG0SxTrhrvceeFPxA","icon":"slack"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"brewit-84","hasAudioNarration":false,"actualSubdomain":"brewit-84","customDomains":["docs.brewit.ai"],"gitSource":{"type":"github","owner":"deliquid","repo":"brewit-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a20c4463f39494aa9eef59b","collectionId":"b0c02fa0-74c4-476c-8ef6-8d042850c79f","schemaVersion":"v2"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6a20c4463f39494aa9eef59b:success","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Documentation","count":28},{"language":"default","tag":"Integrations","count":10},{"language":"default","tag":"Data Agent","count":8},{"language":"default","tag":"Databases","count":8},{"language":"default","tag":"Train your agent","count":3},{"language":"default","tag":"Visualization","count":3},{"language":"default","tag":"Workspace","count":3},{"language":"default","tag":"API Reference","count":2},{"language":"default","tag":"Get Started","count":2},{"language":"default","tag":"Others","count":2}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"docs/data-agent/train/distinct-values","slug":"/docs/data-agent/train/distinct-values","pageMetadata":{"title":"Distinct values","description":"Improve accuracy by storing unique string values of a column.","href":"/docs/data-agent/train/distinct-values"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Improve accuracy by storing unique string values of a column.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{Check,CodeBlock,Heading,Tip,Warning}=_components;if(!Check)_missingMdxReference(`Check`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`what-is-distinct-values`,children:`What is distinct values?`}),`\n`,_jsx(_components.p,{children:`Distinct values is a feature that stores unique string values of a column. It essentially run the following SQL:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT DISTINCT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`column_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` FROM`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`table_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` LIMIT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 50`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`It is useful when you have a column with a limited number of unique values, such as a column with country names or product categories. By storing unique values, distinct values can `,_jsx(_components.strong,{children:`improve the accuracy`}),` of your model and reduce the memory usage.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Currently the maximum number of distinct values that can be stored is `,_jsx(_components.strong,{children:`50`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsxs(_components.p,{children:[`If a user asks `,_jsx(_components.code,{children:`what is the average salary of software engineers in the U.S.?`}),`, the AI model may generate the following SQL`]}),`\n`,_jsxs(_components.p,{children:[`AI-generated SQL `,_jsx(_components.strong,{children:`without`}),` distinct values:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` salaries`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` country `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'U.S.'`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The AI model may not be aware that ‘U.S.’ and ‘United States’ are the same\ncountry. As a result, the query may not return the correct results.`})}),`\n`,_jsxs(_components.p,{children:[`AI-generated SQL `,_jsx(_components.strong,{children:`with`}),` distinct values:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` salaries`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` country `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'United States'`})]}),`\n`]})})}),`\n`,_jsx(Check,{children:_jsx(_components.p,{children:`By using distinct values, the AI model improves the accuracy of the where\nclause.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Distinct values","description":"Improve accuracy by storing unique string values of a column.","href":"/docs/data-agent/train/distinct-values"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What is distinct values?","slug":"what-is-distinct-values","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"brewit-84","siteName":"Brewit Docs","title":"Distinct values - Brewit Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T00:47:04.513Z","originalFileLocation":"docs/data-agent/train/distinct-values.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Improve accuracy by storing unique string values of a column.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Brewit Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Distinct values - Brewit Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Improve accuracy by storing unique string values of a column.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Brewit Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.brewit.ai/docs/data-agent/train/distinct-values\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://brewit-84.mintlify.app/_mintlify/api/og/v2?division=Train+your+agent\u0026amp;title=Distinct+values\u0026amp;description=Improve+accuracy+by+storing+unique+string+values+of+a+column.\u0026amp;theme=af062c7e32a1bb9877d7b9d8\u0026amp;signature=c3369e2cff64f82e826e95ba1035eb78bec7cca3447beecedf18ad5f0d5013c0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Distinct values - Brewit Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Improve accuracy by storing unique string values of a column.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://brewit-84.mintlify.app/_mintlify/api/og/v2?division=Train+your+agent\u0026amp;title=Distinct+values\u0026amp;description=Improve+accuracy+by+storing+unique+string+values+of+a+column.\u0026amp;theme=af062c7e32a1bb9877d7b9d8\u0026amp;signature=c3369e2cff64f82e826e95ba1035eb78bec7cca3447beecedf18ad5f0d5013c0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/brewit-84/fVgOrnVCtxPwUMWA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Brewit Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#181A1F\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.brewit.ai/docs/data-agent/train/distinct-values\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/data-agent/train/distinct-values.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.brewit.ai/#organization\",\"name\":\"Brewit Docs\",\"url\":\"https://docs.brewit.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/brewit-84/pyjAYulKSUrvhjf5/logo/light.svg?fit=max\u0026auto=format\u0026n=pyjAYulKSUrvhjf5\u0026q=85\u0026s=e14ed380b5703ff67bbedc6c9839cb6b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.brewit.ai#website\",\"name\":\"Brewit Docs\",\"url\":\"https://docs.brewit.ai\",\"publisher\":{\"@id\":\"https://docs.brewit.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.brewit.ai/docs/data-agent/train/distinct-values#webpage\",\"url\":\"https://docs.brewit.ai/docs/data-agent/train/distinct-values\",\"name\":\"Distinct values\",\"description\":\"Improve accuracy by storing unique string values of a column.\",\"dateModified\":\"2026-01-07T00:47:04.513Z\",\"isPartOf\":{\"@id\":\"https://docs.brewit.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.brewit.ai/docs/data-agent/train/distinct-values#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.brewit.ai/docs/data-agent/train/distinct-values#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Data Agent\",\"item\":\"https://docs.brewit.ai/docs/data-agent/chat\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Train your agent\",\"item\":\"https://docs.brewit.ai/docs/data-agent/train/data-catalog\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Distinct values\",\"item\":\"https://docs.brewit.ai/docs/data-agent/train/distinct-values\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.brewit.ai/docs/data-agent/train/distinct-values#article\",\"headline\":\"Distinct values\",\"name\":\"Distinct values\",\"description\":\"Improve accuracy by storing unique string values of a column.\",\"url\":\"https://docs.brewit.ai/docs/data-agent/train/distinct-values\",\"mainEntityOfPage\":{\"@id\":\"https://docs.brewit.ai/docs/data-agent/train/distinct-values#webpage\"},\"dateModified\":\"2026-01-07T00:47:04.513Z\",\"publisher\":{\"@id\":\"https://docs.brewit.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.brewit.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Brewit Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Brewit Docs","nav":{"global":{"anchors":[{"anchor":"Community","href":"https://join.slack.com/t/brewit-workspace/shared_invite/zt-269etu3mb-Mjxl2bG0SxTrhrvceeFPxA","icon":"slack"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/docs/introduction"},{"title":"Quickstart","href":"/docs/quickstart"}]},{"group":"Integrations","pages":[{"title":"Overview","href":"/docs/integrations/introduction"},{"group":"Databases","pages":[{"title":"PostgreSQL","href":"/docs/integrations/databases/postgres"},{"title":"MySQL","href":"/docs/integrations/databases/mysql"},{"title":"BigQuery","href":"/docs/integrations/databases/bigquery"},{"title":"Snowflake","href":"/docs/integrations/databases/snowflake"},{"title":"Microsoft SQL Server","href":"/docs/integrations/databases/mssql"},{"title":"Databricks","href":"/docs/integrations/databases/databricks"},{"title":"Workbook","href":"/docs/integrations/databases/workbook"},{"title":"CSV","href":"/docs/integrations/databases/csv"}]},{"group":"How-to","pages":[{"title":"Connecting via SSH Tunnel","href":"/docs/integrations/how-to/ssh-tunnel"}]}]},{"group":"Data Agent","pages":[{"title":"Chat","href":"/docs/data-agent/chat"},{"group":"Train your agent","pages":[{"title":"Data catalog","description":"Explore the essentials of metadata in your datasets, including table and column names.","href":"/docs/data-agent/train/data-catalog"},{"title":"Distinct values","href":"/docs/data-agent/train/distinct-values"},{"title":"Query Library","description":"Query library is useful for saving and reusing frequently used SQL queries.","href":"/docs/data-agent/train/query-library"}]},{"title":"Evaluation","href":"/docs/data-agent/evaluation"},{"title":"Monitoring","href":"/docs/data-agent/monitor"},{"title":"Best Practices","href":"/docs/data-agent/best-practices/large-databases"},{"title":"Embed chat agent","href":"/docs/data-agent/embed"}]},{"group":"Visualization","pages":[{"title":"Charts","href":"/docs/visualization/chart"},{"title":"Notebooks","href":"/docs/visualization/notebook"},{"title":"Dashboards","href":"/docs/visualization/dashboard"}]},{"group":"Workspace","pages":[{"title":"Invite Team Members","href":"/docs/workspace/invite-team-member"},{"title":"Roles \u0026 Permissions","href":"/docs/workspace/access-control"},{"title":"Usage \u0026 Billing","href":"/docs/workspace/usage-billing"}]},{"group":"Others","pages":[{"title":"FAQs","href":"/docs/others/faqs"},{"title":"Security","href":"/docs/others/security"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"title":"Distinct values - Brewit Docs","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":[],"chunks":[]}