{"id":39961,"date":"2023-05-25T12:10:18","date_gmt":"2023-05-25T12:10:18","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=39961"},"modified":"2023-07-28T13:50:08","modified_gmt":"2023-07-28T13:50:08","slug":"generating-sql-query-with-open-ai-displaying-users-birthdays","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/","title":{"rendered":"How to Generate SQL Query with Open AI: Displaying Users&#8217; Birthdays"},"content":{"rendered":"\n<p>Open AI is a platform that provides artificial intelligence-based models that are intended to solve different problems. One of the key concepts is prompts \u2013 that\u2019s how you build your request to generate the solution.<\/p>\n\n\n\n<p>Now, you can use the Open AI with the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-query-builder-sql-query-type\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>SQL Query<\/strong><\/a> by the <em>JetEngine <\/em>plugin. With the text request (prompt), you can generate the query to display the data from the database table. For example, you can get users who published posts in the last two weeks, select product categories with products in stock, and display posts published this week.<\/p>\n\n\n\n<p>This tutorial will show how to generate the SQL query with AI to display users with birthdays this month on the current day and after.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-the-date-meta-field-for-users\">Create the Date Meta Field for Users<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>Guided by the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-how-to-apply-meta-boxes-to-users\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>How to Apply Meta Boxes to Users<\/strong><\/a> tutorial, create the <strong>Meta Box<\/strong> and attach the <strong>Date <\/strong>meta field to users.&nbsp;<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/attach-date-meta-field-to-users-using-meta-box-1024x655.png\" alt=\"attach date meta field to users using meta box\">\n\n\n\n<p>You can add several meta fields of different types, for example, for users&#8217; names, pictures, and additional information.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/meta-fields-for-users-1024x616.png\" alt=\"meta fields for users\">\n\n\n\n<p>Add several users and fill in the <strong>Date<\/strong> meta field for each of them.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/add-new-users-1024x565.png\" alt=\"add new users\">\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-the-sql-query\">Create the SQL Query<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>Proceed to the <strong><em>JetEngine &gt; Query Builder <\/em><\/strong>tab and hit the <strong>\u201cAdd New\u201d <\/strong>button.<\/p>\n\n\n\n<p>Give the query a <strong>Name<\/strong>, and pick the \u201cSQL\/AI Query\u201d <strong>Query Type<\/strong>.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/sql-ai-query-type-1024x405.png\" alt=\"SQL\/AI query type\">\n\n\n\n<p>Enable the <strong>Advanced\/AI mode <\/strong>toggle, and you\u2019ll see that the settings are different than if you decided to write SQL query manually.<\/p>\n\n\n\n<p>To use AI, press the <strong>magic stick<\/strong> icon, and the pop-up for the SQL query generation will appear.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/ai-mode-for-sql-query-1024x639.png\" alt=\"ai mode for SQL query\">\n\n\n<div class=\"note-banner d-flex border-bold border-jetsmartfilters rounded overflow-hidden p-20\"><div class=\"mr-12\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z\" fill=\"#FA5450\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Warning<\/div><p class=\"m-0\">Currently, you can make 30 requests per month with the Lifetime subscription plan and 5 requests per month with other subscriptions.<\/p><\/div><\/div>\n\n\n\n<p>In the text area, you can describe what data you want to display with the query.&nbsp;<\/p>\n\n\n\n<p>Also, you can find tips for the successful prompt (text request with the query description) writing and prompt examples.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/generate-query-with-AI-1024x645.png\" alt=\"generate query with AI\">\n\n\n\n<p>Prompt examples are clickable, so you can select one and use it for the SQL query. I selected \u201cGet users who have birthday on current month. Birthday is stored in &#8216;birth_date&#8217; meta field. Return only future birthdays and all data from the users table.\u201d&nbsp;<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/example-of-the-text-request-with-the-query-description-1024x641.png\" alt=\"example of the text request with the query description\">\n\n\n\n<p>Then, I pushed the <strong>\u201cGenerate query\u201d <\/strong>button.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/generate-query-button-1024x641.png\" alt=\"generate query button\">\n\n\n\n<p>After that, you will see the generated query in the text area.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/generated-query-with-AI-1024x638.png\" alt=\"generated query with AI\">\n\n\n<div class=\"note-banner d-flex border-bold border-jetsmartfilters rounded overflow-hidden p-20\"><div class=\"mr-12\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z\" fill=\"#FA5450\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Warning<\/div><p class=\"m-0\">Generated query with AI might not be accurate, so we recommend reviewing it before using it.<\/p><\/div><\/div>\n\n\n\n<p>For example, in the<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>WHERE m.meta_key = 'birth_date' \n<\/code><\/pre>\n\n\n\n<p>line, the &#8216;birth_date&#8217; value is default, so you need to replace it with the slug of the <strong>Date <\/strong>meta field you created earlier. I replaced it with the \u2018_employee-birthday\u2019 slug.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/replace-the-meta-key-in-the-generated-query-1024x641.png\" alt=\"replace the meta key in the generated query\">\n\n\n\n<p>After reviewing, click the <strong>\u201cUse this query\u201d <\/strong>button.<\/p>\n\n\n\n<p>The generated query will appear in the <strong>SQL Query<\/strong> text area, where you can edit it as well.<\/p>\n\n\n\n<p>Also, pay attention to the <strong>Cast result to instance of object <\/strong>option. The SQL query returns items as the default PHP objects, and with this option, you can convert default objects into the needed ones (posts, users, terms, etc.). This helps avoid errors when working with widgets customized to particular objects (posts, users).<\/p>\n\n\n\n<p>In this case, you need to select the \u201cUser\u201d option.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/cast-result-to-instance-of-object-1024x641.png\" alt=\"cast result to instance of object\">\n\n\n\n<p>After you finish, press the <strong>\u201cAdd\/Update Query\u201d <\/strong>button.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-a-listing-item\">Create a Listing Item<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>Move to the <strong><em>JetEngine &gt; Listings <\/em><\/strong>tab and click the <strong>\u201cAdd New\u201d <\/strong>button.&nbsp;<\/p>\n\n\n\n<p>In the <strong>Setup Listing Item <\/strong>pop-up, you can select the \u201cUsers\u201d or \u201cQuery Builder\u201d <strong>Source<\/strong>. If you choose the \u201cQuery Builder\u201d <strong>Source<\/strong>, you need to pick the needed <strong>Query <\/strong>as well. Enter the <strong>Listing item name <\/strong>and choose the \u201cElementor\u201d or \u201cBlocks<strong> <\/strong>(Gutenberg)\u201d <strong>Listing view<\/strong>. Then, click the <strong>\u201cCreate Listing Item\u201d <\/strong>button.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/setup-listing-item-with-the-query-builder-source-1024x653.png\" alt=\"setup listing item with the query builder source\">\n\n\n\n<p>I used the <strong>Dynamic Field <\/strong>widget to display the users&#8217; information. To learn more, proceed to the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/dynamic-field-widget-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Dynamic Field Overview<\/strong><\/a>.<\/p>\n\n\n\n<p>If you want to display the data from the default WordPress fields for users, select the \u201cPost\/Term\/User\/Object Data\u201d <strong>Source<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"415\" height=\"698\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/displaing-data-from-the-default-WordPress-fields-1.png\" alt=\"\" class=\"wp-image-39963\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/displaing-data-from-the-default-WordPress-fields-1.png 415w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/displaing-data-from-the-default-WordPress-fields-1-178x300.png 178w\" sizes=\"(max-width: 415px) 100vw, 415px\" \/><\/div>\n\n\n\n<p>If you want to display the data from the JetEngine custom fields from the meta box, pick the \u201cMeta Data\u201d <strong>Source<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"318\" height=\"695\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/meta-data-source.png\" alt=\"\" class=\"wp-image-39968\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/meta-data-source.png 318w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/meta-data-source-137x300.png 137w\" sizes=\"(max-width: 318px) 100vw, 318px\" \/><\/div>\n\n\n\n<p>To display images, enable the <strong>Filter field output <\/strong>option and choose the \u201cGet image by ID\u201d <strong>Callback<\/strong>. Navigate to the <a href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/dynamic-field-widget-overview\/#filter-field-output-overview\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Filter Field Output Overview<\/strong><\/a> to learn how to display different data with different callbacks.&nbsp;<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/get-image-by-ID-callback-1024x657.png\" alt=\"get image by ID callback\">\n\n\n\n<p>If you want to display only the day and month instead of the full date, enable the <strong>Filter field output <\/strong>option, pick the \u201cFormat date\u201d <strong>Callback<\/strong>, and enter \u201cF j\u201d instead of \u201cF j, Y.\u201d<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/format-date-callback-1024x661.png\" alt=\"format date callback\">\n\n\n\n<p>After you done customizing, press the <strong>\u201cUpdate\u201d <\/strong>button.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"add-the-listing-grid-to-the-page\">Add the Listing Grid to the Page<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>Move to the <strong>Pages <\/strong>tab and hit the <strong>\u201cAdd New\u201d <\/strong>button or click to edit the created page.<\/p>\n\n\n\n<p>Place the <strong>Listing Grid <\/strong>widget or block to the page and select the recently created <strong>Listing<\/strong> in the <strong>General <\/strong>settings.<\/p>\n\n\n\n<p>If you created the Listing Item with the \u201cQuery Builder\u201d <strong>Source<\/strong>, the <strong>Listing Grid <\/strong>would show the query results immediately.<\/p>\n\n\n\n<p>Today is 25th May, so the query shows only users whose birthday is in the current month on the current day and after, as that was set in the prompt example for the SQL query generation.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/listing-grid-on-the-page-1024x650.png\" alt=\"listing grid on the page\">\n\n\n\n<p>If you created the Listing Item with the \u201cUsers\u201d <strong>Source<\/strong>, open the <strong>Custom Query <\/strong>tab, enable the <strong>Use Custom Query <\/strong>toggle, and choose the needed <strong>Custom Query<\/strong>.&nbsp;<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"335\" height=\"741\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/listing-grid-with-the-custom-query.png\" alt=\"\" class=\"wp-image-39964\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/listing-grid-with-the-custom-query.png 335w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/listing-grid-with-the-custom-query-136x300.png 136w\" sizes=\"(max-width: 335px) 100vw, 335px\" \/><\/div>\n\n\n\n<p>That\u2019s all. Now you know how to generate the SQL query with the Open AI to display users with birthdays this month on the current day and after.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Discover how to generate the SQL query using the power of Open AI to display users with birthdays this month on the current day and after.<\/p>\n","protected":false},"author":8,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[405],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Generate SQL Query with Open AI: Displaying Users&#039; Birthdays | Crocoblock<\/title>\n<meta name=\"description\" content=\"Discover how to generate the SQL query using the power of OpenAI to display users with birthdays this month on the current day and after. Use prompt examples to generate the SQL query.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Generate SQL Query with Open AI: Displaying Users&#039; Birthdays | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Discover how to generate the SQL query using the power of OpenAI to display users with birthdays this month on the current day and after. Use prompt examples to generate the SQL query.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-28T13:50:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/attach-date-meta-field-to-users-using-meta-box-1024x655.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/\",\"name\":\"How to Generate SQL Query with Open AI: Displaying Users' Birthdays | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2023-05-25T12:10:18+00:00\",\"dateModified\":\"2023-07-28T13:50:08+00:00\",\"description\":\"Discover how to generate the SQL query using the power of OpenAI to display users with birthdays this month on the current day and after. Use prompt examples to generate the SQL query.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/articles\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Generate SQL Query with Open AI: Displaying Users&#8217; Birthdays\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"name\":\"Help Center\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\",\"name\":\"Help Center\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"contentUrl\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"caption\":\"Help Center\"},\"image\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Generate SQL Query with Open AI: Displaying Users' Birthdays | Crocoblock","description":"Discover how to generate the SQL query using the power of OpenAI to display users with birthdays this month on the current day and after. Use prompt examples to generate the SQL query.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/","og_locale":"en_US","og_type":"article","og_title":"How to Generate SQL Query with Open AI: Displaying Users' Birthdays | Crocoblock","og_description":"Discover how to generate the SQL query using the power of OpenAI to display users with birthdays this month on the current day and after. Use prompt examples to generate the SQL query.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/","og_site_name":"Help Center","article_modified_time":"2023-07-28T13:50:08+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/05\/attach-date-meta-field-to-users-using-meta-box-1024x655.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/","name":"How to Generate SQL Query with Open AI: Displaying Users' Birthdays | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2023-05-25T12:10:18+00:00","dateModified":"2023-07-28T13:50:08+00:00","description":"Discover how to generate the SQL query using the power of OpenAI to display users with birthdays this month on the current day and after. Use prompt examples to generate the SQL query.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/generating-sql-query-with-open-ai-displaying-users-birthdays\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crocoblock.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/crocoblock.com\/knowledge-base\/articles\/"},{"@type":"ListItem","position":3,"name":"How to Generate SQL Query with Open AI: Displaying Users&#8217; Birthdays"}]},{"@type":"WebSite","@id":"https:\/\/crocoblock.com\/knowledge-base\/#website","url":"https:\/\/crocoblock.com\/knowledge-base\/","name":"Help Center","description":"","publisher":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization","name":"Help Center","url":"https:\/\/crocoblock.com\/knowledge-base\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/","url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","contentUrl":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","caption":"Help Center"},"image":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article\/39961"}],"collection":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/users\/8"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=39961"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=39961"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=39961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}