{"id":358314,"date":"2024-05-21T00:09:18","date_gmt":"2024-05-21T00:09:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=358314"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=358314","title":{"rendered":"<span>LLM&#8217;\u044b \u0432 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0432 SQL (text2sql)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8f4\/b52\/464\/8f4b52464629340ef7760eca557c7fdc.png\" alt=\" \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Kandinsky 2.2.\" title=\" \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Kandinsky 2.2.\" width=\"1024\" height=\"1024\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f4\/b52\/464\/8f4b52464629340ef7760eca557c7fdc.png\"\/><\/p>\n<div><figcaption> \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Kandinsky 2.2.<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u0446\u0430 <a href=\"https:\/\/newtechaudit.ru\/\"><u>\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 NTA<\/u><\/a> \u041c\u0430\u0440\u0438\u043d\u0430 \u041a\u043e\u0440\u043e\u0431\u043e\u0432\u0430.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435. \u0418\u043c\u0435\u043d\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u0438 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439. \u041c\u043d\u043e\u0433\u0438\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u044d\u0442\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044f\u0437\u044b\u043a\u0430 SQL (Structured Query Language). \u041d\u0435 \u0432\u0441\u0435 \u0437\u043d\u0430\u044e\u0442 \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a, \u0438 \u043d\u0435 \u0443 \u0432\u0441\u0435\u0445 \u0435\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0435\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u0412 \u043f\u043e\u0441\u0442\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u044e \u0432\u0430\u0441 \u0441 \u0434\u0432\u0443\u043c\u044f AI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432: <strong>SQLCoder Defog<\/strong> \u0438 <strong>SQLthroughAI.<\/strong><\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0432 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (Natural Language Processing, NLP). \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438 text2sql \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (Large Language Models, LLM). <em>\u0412 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438: <\/em><a href=\"https:\/\/arxiv.org\/abs\/2306.17727\"><em><u>NL2SQL<\/u><\/em><\/a><em>, <\/em><a href=\"https:\/\/arxiv.org\/abs\/1709.00103v1\"><em><u>seq2sql<\/u><\/em><\/a><em>, <\/em><a href=\"https:\/\/arxiv.org\/abs\/2305.11853\"><em><u>NLQ-SQL<\/u><\/em><\/a><em>,<\/em> <a href=\"https:\/\/arxiv.org\/abs\/2203.06918\"><em><u>NLQ2Query<\/u><\/em><\/a><em>, <\/em><a href=\"https:\/\/arxiv.org\/abs\/2310.03866\"><em><u>natural language to SQL<\/u><\/em><\/a><em> \u0438 \u043f\u0440\u043e\u0447\u0435\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u0430\u043c\u0438. <\/em> <\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u0438 \u0442\u0438\u043f\u0430 <strong>LLM for SQL-queries<\/strong> \u043e\u0431\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u043f\u0430\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 (natural language querying, NLQ) \u0438 \u044f\u0437\u044b\u043a\u0435 SQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u043d\u0430\u0431\u043e\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a <a href=\"https:\/\/github.com\/ElementAI\/spider\"><u>Spider<\/u><\/a>, <a href=\"https:\/\/github.com\/salesforce\/WikiSQL\"><u>WikiSQL<\/u><\/a>, <a href=\"https:\/\/github.com\/taoyds\/sparc\"><u>SParC<\/u><\/a> \u0438 <a href=\"https:\/\/unifiedskg.com\/benchmarks\/\"><u>\u0434\u0440\u0443\u0433\u0438\u0435<\/u><\/a>.<\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 text-to-SQL \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 <strong>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/strong>: \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f (\u0441\u0445\u0435\u043c\u044b) \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f LLM for SQL-queries \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 (\u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438) \u0438 \u0440\u0438\u0441\u043a \u043f\u043e\u0445\u0438\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e SQL-\u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439, \u0447\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0447\u0438\u0439. \u0412\u0442\u043e\u0440\u0430\u044f \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 LLM \u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0439 (self-hosted) \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432: <a href=\"https:\/\/github.com\/Dataherald\/dataherald\"><u>Dataherald<\/u><\/a>, <a href=\"https:\/\/github.com\/eosphoros-ai\/DB-GPT\"><u>DB-GBT<\/u><\/a>, <a href=\"https:\/\/github.com\/microsoft\/semantic-memory\/tree\/main\/examples\/200-dotnet-nl2sql\"><u>NL2SQL<\/u><\/a> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/758910\/\"><u>\u043f\u043e\u0441\u0442\u0430<\/u><\/a> \u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 <a href=\"https:\/\/github.com\/defog-ai\/sqlcoder\"><u>SQLCoder Defog<\/u><\/a>, \u0430 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 \u043d\u0435\u0439 \u0432\u044b\u0431\u0440\u0430\u043b\u0430 <a href=\"https:\/\/sqlthroughai.com\/\"><u>SQLthroughAI<\/u><\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0443\u044e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043e\u0442 Open AI.<\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u043c\u043e\u0434\u0435\u043b\u044f\u0445<\/h2>\n<p><strong>SQLCoder <\/strong>\u2014 \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441 15 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 StarCoder \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Defog. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0448\u043b\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 10\u00a0537 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u044e\u0434\u044c\u043c\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 10 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0445\u0435\u043c \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u0432 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<ul>\n<li>\n<p> \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u0430\u043f: \u00ab\u043b\u0435\u0433\u043a\u0438\u0435\u00bb \u0438 \u00ab\u0441\u0440\u0435\u0434\u043d\u0438\u0435\u00bb \u0432\u043e\u043f\u0440\u043e\u0441\u044b (easy+medium);<\/p>\n<\/li>\n<li>\n<p> \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u0430\u043f: \u00ab\u0441\u043b\u043e\u0436\u043d\u044b\u0435\u00bb \u0438 \u00ab\u0441\u0432\u0435\u0440\u0445\u0441\u043b\u043e\u0436\u043d\u044b\u0435\u00bb \u0432\u043e\u043f\u0440\u043e\u0441\u044b (hard+extra-hard).<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043f\u0443\u0442\u0435\u043c \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/taoyds\/spider\/blob\/bd63bdb1e491a1132096f5c468e1df055f409af5\/evaluation_examples\/README.md?plain=1#L25-L38C45\"><u>\u0440\u0443\u0431\u0440\u0438\u043a\u0430\u0446\u0438\u0438<\/u><\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 Spider. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u0437\u044f\u0442\u044b\u0445 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430, \u0431\u044b\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c defog-easy. \u0414\u043b\u044f \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u2013 <a href=\"https:\/\/github.com\/defog-ai\/sql-eval\"><u>sql-eval<\/u><\/a>.<\/p>\n<p>SQLCoder <a href=\"https:\/\/github.com\/defog-ai\/sqlcoder#results-by-question-category\"><u>\u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442<\/u><\/a> gpt-3.5-turbo \u0438 text-davinci-003, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 10 \u0440\u0430\u0437 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u043c\u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440, \u0430 \u043f\u0440\u0438 \u0442\u043e\u043d\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0445\u0435\u043c \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 SQLCoder \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0435\u043c GPT-4 OpenAI, \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 (\u043d\u0430 A100 GPU).<\/p>\n<p>\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <strong>SQLCoder<\/strong>:<\/p>\n<ul>\n<li>\n<p> \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0437 <a href=\"https:\/\/huggingface.co\/defog\/sqlcoder\"><u>Hugging Face<\/u><\/a>;<\/p>\n<\/li>\n<li>\n<p> \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0435\u043c\u043e-\u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/defog.ai\/sqlcoder-demo\/\"><u>\u0432\u0435\u0431-\u0441\u0430\u0439\u0442<\/u><\/a>;<\/p>\n<\/li>\n<li>\n<p> \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0431\u043b\u043e\u043a\u043d\u043e\u0442 \u0432 <a href=\"https:\/\/colab.research.google.com\/drive\/13BIKsqHnPOBcQ-ba2p77L5saiepTIwu0#scrollTo=ZpbVgVHMkJvC\"><u>Colab<\/u><\/a>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>SQLthroughAI<\/strong> \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043e\u0442 Open AI. \u041d\u0430 <a href=\"https:\/\/sqlthroughai.com\/\"><u>\u0441\u0430\u0439\u0442\u0435<\/u><\/a> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u0430\u043b\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u044b\u043b\u0430 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043d\u043e \u0437\u0430 \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c: SQLtroughAI@gmail.com.  <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u044f \u0432\u044b\u0431\u0440\u0430\u043b\u0430 \u044d\u0442\u043e\u0442 AI-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a? \u041e\u043d \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 API key \u0438 \u0438\u043c\u0435\u0435\u0442 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<h2>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/h2>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0445\u043e\u0442\u0435\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0433 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u0432\u0441\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0440\u044f\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u0436\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0443, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043f\u043e\u043c\u043e\u0447\u044c \u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<p>\u0425\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f SQLthroughAI \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a, AI-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 SQL-\u043e\u0442\u0432\u0435\u0442\u044b.<\/p>\n<p>\u0412\u0441\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0432\u0437\u044f\u0442\u044b c \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/sql-academy.org\/ru\/trainer\"><u>sql-academy<\/u><\/a>. \u0412\u044b\u0431\u0435\u0440\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u00ab\u0410\u0432\u0438\u0430\u043f\u0435\u0440\u0435\u043b\u0435\u0442\u044b\u00bb \u0438 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f. \u0421\u043e\u0437\u0434\u0430\u043c \u0435\u0451 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DDL (\u044f\u0437\u044b\u043a\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445). \u0422\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u043c\u0442\u043e\u043c \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 SQLCoder \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c MySQL, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0430\u0439\u0442 sql-academy \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0434\u0438\u0430\u043b\u0435\u043a\u0442\u0435.<\/p>\n<p>\u0414\u043b\u044f SQLthroughAI \u0441\u043e\u0437\u0434\u0430\u043c \u0441\u0445\u0435\u043c\u0443 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u044e \u0441\u0432\u044f\u0437\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u043f\u0440\u043e\u043c\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u0438\u0430\u043b\u0435\u043a\u0442, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; MySQL.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0430 AI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 Airbnb.<\/p>\n<h3>\u0410\u0432\u0438\u0430\u043f\u0435\u0440\u0435\u043b\u0435\u0442\u044b<\/h3>\n<details class=\"spoiler\">\n<summary>SQLCoder<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>CREATE TABLE trip( id INT PRIMARY KEY, company INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438-\u043f\u0435\u0440\u0435\u0432\u043e\u0437\u0447\u0438\u043a\u0430 plane VARCHAR, -- \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430 town_from VARCHAR, -- \u0433\u043e\u0440\u043e\u0434 \u0432\u044b\u043b\u0435\u0442\u0430 town_to VARCHAR, -- \u0433\u043e\u0440\u043e\u0434 \u043f\u0440\u0438\u043b\u0451\u0442\u0430 time_out DATETIME, -- \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043b\u0435\u0442\u0430 time_in DATETIME -- \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u043b\u0451\u0442\u0430 );   CREATE TABLE company( id INT PRIMARY KEY, name VARCHAR -- \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438-\u043f\u0435\u0440\u0435\u0432\u043e\u0437\u0447\u0438\u043a\u0430 );  CREATE TABLE pass_in_trip( id INT PRIMARY KEY, trip INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u0438\u043b\u0435\u0442\u0430 passenger INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 place VARCHAR -- \u043c\u0435\u0441\u0442\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 \u0432 \u0441\u0430\u043c\u043e\u043b\u0451\u0442\u0435 );  CREATE TABLE passenger( id INT PRIMARY KEY, name VARCHAR -- \u0438\u043c\u044f \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 );<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>SQLthroughAI<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/924\/997\/6f9\/9249976f964bf043aaaba3935c94e2d5.png\" alt=\" \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e 4 \u0442\u0438\u043f\u0430 \u043f\u043e\u043b\u044f (string, date, number, id).\" title=\" \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e 4 \u0442\u0438\u043f\u0430 \u043f\u043e\u043b\u044f (string, date, number, id).\" width=\"402\" height=\"500\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/924\/997\/6f9\/9249976f964bf043aaaba3935c94e2d5.png\"\/><\/p>\n<div><figcaption> \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e 4 \u0442\u0438\u043f\u0430 \u043f\u043e\u043b\u044f (string, date, number, id).<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/351\/9b5\/16c\/3519b516c937167441e07810efc66503.png\" width=\"1309\" height=\"671\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/351\/9b5\/16c\/3519b516c937167441e07810efc66503.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2f8\/132\/148\/2f813214847063635a7eb3869636085a.png\" width=\"486\" height=\"110\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2f8\/132\/148\/2f813214847063635a7eb3869636085a.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ad3\/f0d\/388\/ad3f0d3886cb5aa3d079815cd9d525ac.png\" width=\"445\" height=\"80\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad3\/f0d\/388\/ad3f0d3886cb5aa3d079815cd9d525ac.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<h3>Airbnb<\/h3>\n<details class=\"spoiler\">\n<summary>SQLCoder<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>-- \u043e\u0442\u0437\u044b\u0432\u044b \u043d\u0430 \u0430\u0440\u0435\u043d\u0434\u0443\u0435\u043c\u043e\u0435 \u0436\u0438\u043b\u044c\u0435 CREATE TABLE Reviews(  id INT PRIMARY KEY, reservation_id INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u0440\u043e\u043d\u0438 rating INT, -- \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u043e\u0442 1 \u0434\u043e 5 );   -- \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f CREATE TABLE users( id INT PRIMARY KEY, name VARCHAR, -- \u0438\u043c\u044f \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f email VARCHAR, -- \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u043f\u043e\u0447\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f email_verified_at DATETIME, -- \u0434\u0430\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u0447\u0442\u044b password VARCHAR, -- \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 phone_number VARCHAR -- \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f );  -- \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0436\u0438\u043b\u044c\u044f CREATE TABLE Reservations( id INT PRIMARY KEY, user_id INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440  \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f room_id INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440  \u0436\u0438\u043b\u044c\u044f start_date DATETIME, -- \u0434\u0430\u0442\u0430 \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f end_date DATETIME, -- \u0434\u0430\u0442\u0430 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f price INT, -- \u0446\u0435\u043d\u0430 \u0437\u0430 \u0441\u0443\u0442\u043a\u0438 total INT -- \u043e\u0431\u0449\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f );  -- \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0436\u0438\u043b\u044c\u044f CREATE TABLE Rooms( id INT PRIMARY KEY, home_type VARCHAR, -- \u0442\u0438\u043f \u0436\u0438\u043b\u044c\u044f address VARCHAR, -- \u0430\u0434\u0440\u0435\u0441 \u0436\u0438\u043b\u044c\u044f has_tv BOOLEAN, -- \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u0430 has_internet BOOLEAN, -- \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 has_kitchen BOOLEAN, -- \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u0443\u0445\u043d\u0438 has_air_con BOOLEAN, -- \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u043d\u0434\u0438\u0446\u0438\u043e\u043d\u0435\u0440\u0430 price INT, -- \u0446\u0435\u043d\u0430 \u0437\u0430 \u0441\u0443\u0442\u043a\u0438 owner_id INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 latitude FLOAT, -- \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0448\u0438\u0440\u043e\u0442\u0430 longitude FLOAT -- \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0434\u043e\u043b\u0433\u043e\u0442\u0430 );<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>SQLthroughAI<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/500\/5e5\/f26\/5005e5f260bfa0582717e9589140a784.png\" width=\"1390\" height=\"545\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/500\/5e5\/f26\/5005e5f260bfa0582717e9589140a784.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0bc\/d54\/508\/0bcd54508f93d49f3c9869eb4d6e9eca.png\" alt=\" \u0412\u044b\u0431\u0438\u0440\u0430\u044e \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.\" title=\" \u0412\u044b\u0431\u0438\u0440\u0430\u044e \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.\" width=\"457\" height=\"86\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0bc\/d54\/508\/0bcd54508f93d49f3c9869eb4d6e9eca.png\"\/><\/p>\n<div><figcaption> \u0412\u044b\u0431\u0438\u0440\u0430\u044e \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/details>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h3>\n<p>\u2116 55:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>NL-query (\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\">\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0438\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0439\u0441\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>SQL query (\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 SQL-\u0437\u0430\u043f\u0440\u043e\u0441)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>SQLCoder (<em>\u043d\u0435\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"> <strong>SQLthroughAI (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> <code>WITH min_trip_count AS (<\/code><\/p>\n<p><code> SELECT company, count(*) AS trip_count<\/code><\/p>\n<p><code> FROM trip<\/code><\/p>\n<p><code> GROUP BY company<\/code><\/p>\n<p><code> ORDER BY trip_count ASC<\/code><\/p>\n<p><code> LIMIT 1)<\/code><\/p>\n<p><code> DELETE FROM company<\/code><\/p>\n<p><code> WHERE id IN (SELECT company<\/code><\/p>\n<p><code> FROM min_trip_count)<\/code><\/p>\n<\/td>\n<td>\n<p> <code>DELETE FROM company<\/code><\/p>\n<p><code> WHERE id IN  <\/code><\/p>\n<p><code> (SELECT t.company  <\/code><\/p>\n<p><code> FROM trip t  <\/code><\/p>\n<p><code> GROUP BY t.company<\/code><\/p>\n<p><code> HAVING COUNT(*) =  <\/code><\/p>\n<p><code> (SELECT MIN(count_flights)  <\/code><\/p>\n<p><code> FROM (SELECT COUNT(*) AS count_flights  <\/code><\/p>\n<p><code> FROM trip  <\/code><\/p>\n<p><code> GROUP BY company ) AS subquery ) );<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h4>\n<p>\u0412 \u0447\u0451\u043c \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0442 SQLCoder? \u041c\u043e\u0434\u0435\u043b\u044c \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0439\u0441\u043e\u0432. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u0430\u0436\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0430 \u0440\u0435\u0448\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<h3>\u2116 58:<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>NL-query <\/strong> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\">\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0437\u044b\u0432 \u0441 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u043e\u043c 5 \u043d\u0430 \u0436\u0438\u043b\u044c\u0435, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 &#171;11218, Friel Place, New York&#187;, \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 &#171;George Clooney&#187;.<\/p>\n<p align=\"left\">\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 (id) \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 + 1.<\/p>\n<p align=\"left\">\u0420\u0435\u0437\u0435\u0440\u0432\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043d\u0430\u0442\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0437\u044b\u0432, \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u0430, \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0435\u0451 \u043d\u0430\u0439\u0442\u0438.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>SQL query<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>SQLCoder (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>SQLthroughAI (<em>\u043d\u0435\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> <code>INSERT INTO reviews (id, rating, reservation_id)<\/code><\/p>\n<p><code> VALUES (<\/code><\/p>\n<p><code> (SELECT COUNT(*) + 1 FROM reviews as a),<\/code><\/p>\n<p><code> 5,<\/code><\/p>\n<p><code> (SELECT r.id<\/code><\/p>\n<p><code> FROM reservations r  <\/code><\/p>\n<p><code> JOIN rooms r1 on r.room_id = r1.id<\/code><\/p>\n<p><code> WHERE r1.address = '11218, Friel Place, New York'<\/code><\/p>\n<p><code> and r.user_id = (SELECT u.id FROM users u WHERE u.name = 'George Clooney')));<\/code><\/p>\n<\/td>\n<td>\n<p> <code>INSERT INTO Reviews (id, reservation_id, rating)  <\/code><\/p>\n<p><code> VALUES (<\/code><\/p>\n<p><code> (SELECT COUNT(*)+1 FROM Reviews),<\/code><\/p>\n<p><code> (SELECT id  <\/code><\/p>\n<p><code>     FROM Reservations  <\/code><\/p>\n<p><code>     WHERE room_id = (SELECT id FROM Rooms WHERE address = \"11218, Friel Place, New York\")),<\/code><\/p>\n<p><code> 5);<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h4>\n<p>SQLthroughAI \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c (<code>name = 'George Clooney'<\/code>), \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<h3>\u2116 68:<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>NL-query <\/strong> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\">\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u043d\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043d\u0438\u043c\u0430\u043b\u0438 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 1 \u0440\u0430\u0437, \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u0441\u043d\u0438\u043c\u0430\u0432\u0448\u0435\u0433\u043e \u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437, \u0438 \u0434\u0430\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0432\u044b\u0435\u0445\u0430\u043b.<\/p>\n<p align=\"left\">\u041f\u043e\u043b\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/p>\n<p align=\"left\"><code>room_id<\/code><\/p>\n<p align=\"left\"><code>name<\/code><\/p>\n<p align=\"left\"><code>end_date<\/code><\/p>\n<p align=\"left\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e &#171;<code>as room_id<\/code>&#187; \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u043c\u043d\u0430\u0442\u044b.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>SQL query<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>SQLCoder (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>SQLthroughAI (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> <code>WITH last_seen AS (<\/code><\/p>\n<p><code> SELECT r.room_id, u.name, r.end_date FROM reservations r join users u on r.user_id = u.id  <\/code><\/p>\n<p><code> WHERE  r.start_date = (SELECT max(start_date)  <\/code><\/p>\n<p><code> FROM reservations<\/code><\/p>\n<p><code> WHERE  room_id = r.room_id))<\/code><\/p>\n<p><code> SELECT l.room_id, l.name, l.end_date<\/code><\/p>\n<p><code> FROM last_seen l<\/code><\/p>\n<p><code> GROUP BY l.room_id, l.name, l.end_date<\/code><\/p>\n<p><code> HAVING count(*) >= 1;<\/code><\/p>\n<\/td>\n<td>\n<p> <code>SELECT r.room_id AS room_id,<\/code><\/p>\n<p><code> u.name AS name,<\/code><\/p>\n<p><code> r.end_date AS end_date  <\/code><\/p>\n<p><code> FROM Reservations r  <\/code><\/p>\n<p><code> JOIN users u ON r.user_id = u.id  <\/code><\/p>\n<p><code> WHERE r.room_id IN  <\/code><\/p>\n<p><code> (SELECT room_id  <\/code><\/p>\n<p><code> FROM Reservations  <\/code><\/p>\n<p><code> GROUP BY room_id  <\/code><\/p>\n<p><code> HAVING COUNT(DISTINCT user_id) > 0 ) AND r.id = ( SELECT id FROM Reservations r2 WHERE r2.room_id = r.room_id ORDER BY end_date DESC LIMIT 1 )<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h4>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f.<\/p>\n<h3>\u2116 69:<\/h3>\n<p>\u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u0412 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u0430 NULL \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435.<\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u0438 \u043f\u043b\u043e\u0445\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c \u0437\u0430\u0434\u0430\u043d\u0438\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>NL-query <\/strong> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\">\u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0432\u0441\u0435\u0445 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u043a\u043e\u043c\u043d\u0430\u0442 \u0438 \u0441\u0443\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u043d\u0438 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438. \u0421\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043f\u043e\u043b\u044e total.<\/p>\n<p align=\"left\">\u0417\u0430\u043c\u0435\u043d\u0438 \u0432\u0441\u0435 NULL \u0432 \u043f\u043e\u043b\u0435 \u0441\u0443\u043c\u043c\u044b \u043d\u0430 \u043d\u043e\u043b\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e COALESCE.<\/p>\n<p align=\"left\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e &#171;<code>as owner_id<\/code>&#187; \u0438 &#171;<code>as total_earn<\/code>&#187; \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u0438 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>SQL query<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>SQLCoder (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>SQLthroughAI (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><code>SELECT rooms.owner_id as owner_id,<\/code><\/p>\n<p align=\"left\"><code>COALESCE(sum(reservations.total),0) as total_earn<\/code><\/p>\n<p align=\"left\"><code>FROM rooms LEFT JOIN reservations<\/code><\/p>\n<p align=\"left\"><code>ON rooms.id = reservations.room_id<\/code><\/p>\n<p align=\"left\"><code>GROUP BY rooms.owner_id;<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>SELECT owner_id as owner_id, COALESCE(SUM(total), 0) as total_earn<\/code><\/p>\n<p align=\"left\"><code>FROM Rooms <\/code><\/p>\n<p align=\"left\"><code>LEFT JOIN Reservations ON Rooms.id = Reservations.room_id<\/code><\/p>\n<p align=\"left\"><code>GROUP BY owner_id<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h4>\n<p>\u041e\u0431\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u0435\u043c.<\/p>\n<h3>\u2116 71:<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>NL-query <\/strong> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\">\u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u043a\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0445\u043e\u0442\u044c \u0440\u0430\u0437 \u0430\u0440\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u0438 \u0438\u043b\u0438 \u0441\u0434\u0430\u0432\u0430\u043b\u0438 \u0432 \u0430\u0440\u0435\u043d\u0434\u0443 \u0436\u0438\u043b\u044c\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0438\u0442\u0435 \u0434\u043e \u0441\u043e\u0442\u044b\u0445.<\/p>\n<p align=\"left\">\u041f\u043e\u043b\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/p>\n<p align=\"left\"><code>percent<\/code><\/p>\n<p align=\"left\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e &#171;<code>as percent<\/code>&#187; \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u043e\u0442\u0432\u0435\u0442\u0430\u00a0\u2014 65.23.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>SQL query<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>SQLCoder (<em>\u043d\u0435\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>SQLthroughAI (<em>\u043d\u0435\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> <code>WITH active_users AS (<\/code><\/p>\n<p><code>   SELECT count(*) AS active_users_count<\/code><\/p>\n<p><code>   FROM users<\/code><\/p>\n<p><code>   WHERE id IN (SELECT DISTINCT user_id<\/code><\/p>\n<p><code>                FROM reservations))<\/code><\/p>\n<p><code> SELECT ROUND(100.0 * active_users.active_users_count \/ (SELECT count(*)<\/code><\/p>\n<p><code> FROM users), 2) AS percent<\/code><\/p>\n<p><code> FROM active_users;<\/code><\/p>\n<\/td>\n<td>\n<p> <code>SELECT (COUNT(DISTINCT u.id) \/ COUNT(DISTINCT r.user_id) * 100) AS percent  <\/code><\/p>\n<p><code> FROM users u  <\/code><\/p>\n<p><code> LEFT JOIN Reservations r ON u.id = r.user_id  <\/code><\/p>\n<p><code> WHERE u.email_verified_at IS NOT NULL  <\/code><\/p>\n<p><code> AND r.user_id IS NOT NULL  <\/code><\/p>\n<p><code> AND (r.start_date IS NOT NULL OR r.end_date IS NOT NULL)<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h4>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043e\u0431\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u0436\u0438\u043b\u044c\u044f, \u0442\u0430\u043a\u0436\u0435 SQLthroughAI \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041e\u0446\u0435\u043d\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h2>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"133\" width=\"133\">\n<p align=\"center\">\u041c\u043e\u0434\u0435\u043b\u044c<\/p>\n<\/th>\n<th data-colwidth=\"93\" width=\"93\">\n<p align=\"center\">\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/th>\n<th data-colwidth=\"99\" width=\"99\">\n<p align=\"center\">\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/th>\n<th data-colwidth=\"142\" width=\"142\">\n<p align=\"center\"> \u0412\u0435\u0440\u043d\u043e (\u043d\u043e\u043c\u0435\u0440\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u0439)<\/p>\n<\/th>\n<th data-colwidth=\"138\" width=\"138\">\n<p align=\"center\">\u041d\u0435\u0432\u0435\u0440\u043d\u043e (\u043d\u043e\u043c\u0435\u0440\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u0439) <\/p>\n<\/th>\n<th>\n<p align=\"center\">\u041f\u0440\u043e\u0446\u0435\u043d\u0442 \u0432\u0435\u0440\u043d\u044b\u0445<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td rowspan=\"4\" data-colwidth=\"133\" width=\"133\">\n<p align=\"center\"><strong>SQLCoder<\/strong><\/p>\n<\/td>\n<td rowspan=\"3\" data-colwidth=\"93\" width=\"93\">\n<p align=\"left\">\u041f\u0435\u0440\u0435\u043b\u0451\u0442\u044b <\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"left\"> \u041b\u0451\u0433\u043a\u0438\u0435<\/p>\n<\/td>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\">2, 3, 4, 5, 6, 7, 9, 28, 56<\/p>\n<\/td>\n<td data-colwidth=\"138\" width=\"138\">\n<p align=\"left\">1, 12, 14, 15<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p align=\"left\">17\/26\u224865%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"left\">\u0421\u0440\u0435\u0434\u043d\u0438\u0435<\/p>\n<\/td>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\">8, 13, 16, 29, 30<\/p>\n<\/td>\n<td data-colwidth=\"138\" width=\"138\">\n<p align=\"left\">10, 11, 67<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"left\">\u0421\u043b\u043e\u0436\u043d\u044b\u0435<\/p>\n<\/td>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\">\n<\/td>\n<td data-colwidth=\"138\" width=\"138\">\n<p align=\"left\">55<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"93\" width=\"93\">\n<p align=\"left\">Airbnb<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"left\">\u0421\u043b\u043e\u0436\u043d\u044b\u0435<\/p>\n<\/td>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\">58, 68, 69<\/p>\n<\/td>\n<td data-colwidth=\"138\" width=\"138\">\n<p align=\"left\">71<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\" data-colwidth=\"133\" width=\"133\">\n<p align=\"center\"><strong> SQLthroughAI<\/strong><\/p>\n<\/td>\n<td rowspan=\"3\" data-colwidth=\"93\" width=\"93\">\n<p align=\"left\">\u041f\u0435\u0440\u0435\u043b\u0451\u0442\u044b<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"left\">\u041b\u0451\u0433\u043a\u0438\u0435<\/p>\n<\/td>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\">2, 3, 4, 5, 7, 9, 14, 15, 28, 56<\/p>\n<\/td>\n<td data-colwidth=\"138\" width=\"138\">\n<p align=\"left\">1, 6, 12<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p align=\"left\">18\/26\u224869%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"left\">\u0421\u0440\u0435\u0434\u043d\u0438\u0435 <\/p>\n<\/td>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\">10, 11, 16, 29, 30<\/p>\n<\/td>\n<td data-colwidth=\"138\" width=\"138\">\n<p align=\"left\">8, 13, 67<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"left\">\u0421\u043b\u043e\u0436\u043d\u044b\u0435<\/p>\n<\/td>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\">55<\/p>\n<\/td>\n<td data-colwidth=\"138\" width=\"138\">\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"93\" width=\"93\">\n<p align=\"left\">Airbnb<\/p>\n<\/td>\n<td data-colwidth=\"99\" width=\"99\">\n<p align=\"left\">\u0421\u043b\u043e\u0436\u043d\u044b\u0435<\/p>\n<\/td>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\">68, 69<\/p>\n<\/td>\n<td data-colwidth=\"138\" width=\"138\">\n<p align=\"left\">58, 71<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0434\u0432\u0435 \u0442\u0440\u0435\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th><\/th>\n<th>\n<p align=\"center\">SQLCoder<\/p>\n<\/th>\n<th>\n<p align=\"center\">SQLthroughAI<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041b\u0451\u0433\u043a\u0438\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2248 69,2%<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2248 76,9%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0421\u0440\u0435\u0434\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2248 62,5%<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2248 62,5%<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0422\u044f\u0436\u0435\u043b\u044b\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2248 60%<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u2248 60%<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h2>\n<p>\u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u044f \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<\/th>\n<th>\n<p align=\"center\">SQLCoder<\/p>\n<\/th>\n<th>\n<p align=\"center\">SQLthroughAI<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">Hugging Face; Colab; \u0432\u0435\u0431-\u0441\u0430\u0439\u0442.<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0435\u0431-\u0441\u0430\u0439\u0442.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"> \u0414\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">MySQL, PostgreSQL, Amazon Redshift, Showflake, BigQuery, Azure SQL <\/p>\n<\/td>\n<td>\n<p align=\"left\">MySQL, PostgreSQL, MS SQL, Mongo DB, Oracle PL\/SQL, BigQuery, MariaDB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">DDL <\/p>\n<\/td>\n<td>\n<p align=\"left\">CSV\/Excel; DDL; \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0441\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">String, Date, Number, ID<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0440\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">65%<\/p>\n<\/td>\n<td>\n<p align=\"left\">69%<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<p>SQLCoder \u0438 SQLthroughAI \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 SQL. \u041d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u0435\u0437 \u043e\u043f\u044b\u0442\u0430 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u0438 AI-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0447\u0442\u0438 \u0432 \u0442\u0440\u0435\u0442\u0438 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u044e\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438, \u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043a\u0430\u043a \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u0438\u043b\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0438\u0434\u0435\u0439 \u044d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438: \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043f\u043e\u043c\u043e\u0447\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0445.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/769454\/\"> https:\/\/habr.com\/ru\/articles\/769454\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\">\n<div><figcaption> \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Kandinsky 2.2.<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u0446\u0430 <a href=\"https:\/\/newtechaudit.ru\/\"><u>\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 NTA<\/u><\/a> \u041c\u0430\u0440\u0438\u043d\u0430 \u041a\u043e\u0440\u043e\u0431\u043e\u0432\u0430.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435. \u0418\u043c\u0435\u043d\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u0438 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439. \u041c\u043d\u043e\u0433\u0438\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u044d\u0442\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044f\u0437\u044b\u043a\u0430 SQL (Structured Query Language). \u041d\u0435 \u0432\u0441\u0435 \u0437\u043d\u0430\u044e\u0442 \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a, \u0438 \u043d\u0435 \u0443 \u0432\u0441\u0435\u0445 \u0435\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0435\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u0412 \u043f\u043e\u0441\u0442\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u044e \u0432\u0430\u0441 \u0441 \u0434\u0432\u0443\u043c\u044f AI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432: <strong>SQLCoder Defog<\/strong> \u0438 <strong>SQLthroughAI.<\/strong><\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0432 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (Natural Language Processing, NLP). \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438 text2sql \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (Large Language Models, LLM). <em>\u0412 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438: <\/em><a href=\"https:\/\/arxiv.org\/abs\/2306.17727\"><em><u>NL2SQL<\/u><\/em><\/a><em>, <\/em><a href=\"https:\/\/arxiv.org\/abs\/1709.00103v1\"><em><u>seq2sql<\/u><\/em><\/a><em>, <\/em><a href=\"https:\/\/arxiv.org\/abs\/2305.11853\"><em><u>NLQ-SQL<\/u><\/em><\/a><em>,<\/em> <a href=\"https:\/\/arxiv.org\/abs\/2203.06918\"><em><u>NLQ2Query<\/u><\/em><\/a><em>, <\/em><a href=\"https:\/\/arxiv.org\/abs\/2310.03866\"><em><u>natural language to SQL<\/u><\/em><\/a><em> \u0438 \u043f\u0440\u043e\u0447\u0435\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u0430\u043c\u0438. <\/em> <\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u0438 \u0442\u0438\u043f\u0430 <strong>LLM for SQL-queries<\/strong> \u043e\u0431\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u043f\u0430\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 (natural language querying, NLQ) \u0438 \u044f\u0437\u044b\u043a\u0435 SQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u043d\u0430\u0431\u043e\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a <a href=\"https:\/\/github.com\/ElementAI\/spider\"><u>Spider<\/u><\/a>, <a href=\"https:\/\/github.com\/salesforce\/WikiSQL\"><u>WikiSQL<\/u><\/a>, <a href=\"https:\/\/github.com\/taoyds\/sparc\"><u>SParC<\/u><\/a> \u0438 <a href=\"https:\/\/unifiedskg.com\/benchmarks\/\"><u>\u0434\u0440\u0443\u0433\u0438\u0435<\/u><\/a>.<\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 text-to-SQL \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 <strong>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/strong>: \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f (\u0441\u0445\u0435\u043c\u044b) \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f LLM for SQL-queries \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 (\u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438) \u0438 \u0440\u0438\u0441\u043a \u043f\u043e\u0445\u0438\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e SQL-\u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439, \u0447\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0447\u0438\u0439. \u0412\u0442\u043e\u0440\u0430\u044f \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 LLM \u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0439 (self-hosted) \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432: <a href=\"https:\/\/github.com\/Dataherald\/dataherald\"><u>Dataherald<\/u><\/a>, <a href=\"https:\/\/github.com\/eosphoros-ai\/DB-GPT\"><u>DB-GBT<\/u><\/a>, <a href=\"https:\/\/github.com\/microsoft\/semantic-memory\/tree\/main\/examples\/200-dotnet-nl2sql\"><u>NL2SQL<\/u><\/a> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/758910\/\"><u>\u043f\u043e\u0441\u0442\u0430<\/u><\/a> \u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 <a href=\"https:\/\/github.com\/defog-ai\/sqlcoder\"><u>SQLCoder Defog<\/u><\/a>, \u0430 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 \u043d\u0435\u0439 \u0432\u044b\u0431\u0440\u0430\u043b\u0430 <a href=\"https:\/\/sqlthroughai.com\/\"><u>SQLthroughAI<\/u><\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0443\u044e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043e\u0442 Open AI.<\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u043c\u043e\u0434\u0435\u043b\u044f\u0445<\/h2>\n<p><strong>SQLCoder <\/strong>\u2014 \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441 15 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 StarCoder \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Defog. \u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0448\u043b\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 10\u00a0537 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u044e\u0434\u044c\u043c\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 10 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0445\u0435\u043c \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u0432 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<ul>\n<li>\n<p> \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u0430\u043f: \u00ab\u043b\u0435\u0433\u043a\u0438\u0435\u00bb \u0438 \u00ab\u0441\u0440\u0435\u0434\u043d\u0438\u0435\u00bb \u0432\u043e\u043f\u0440\u043e\u0441\u044b (easy+medium);<\/p>\n<\/li>\n<li>\n<p> \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u0430\u043f: \u00ab\u0441\u043b\u043e\u0436\u043d\u044b\u0435\u00bb \u0438 \u00ab\u0441\u0432\u0435\u0440\u0445\u0441\u043b\u043e\u0436\u043d\u044b\u0435\u00bb \u0432\u043e\u043f\u0440\u043e\u0441\u044b (hard+extra-hard).<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043f\u0443\u0442\u0435\u043c \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/taoyds\/spider\/blob\/bd63bdb1e491a1132096f5c468e1df055f409af5\/evaluation_examples\/README.md?plain=1#L25-L38C45\"><u>\u0440\u0443\u0431\u0440\u0438\u043a\u0430\u0446\u0438\u0438<\/u><\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 Spider. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u0437\u044f\u0442\u044b\u0445 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430, \u0431\u044b\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c defog-easy. \u0414\u043b\u044f \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u2013 <a href=\"https:\/\/github.com\/defog-ai\/sql-eval\"><u>sql-eval<\/u><\/a>.<\/p>\n<p>SQLCoder <a href=\"https:\/\/github.com\/defog-ai\/sqlcoder#results-by-question-category\"><u>\u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442<\/u><\/a> gpt-3.5-turbo \u0438 text-davinci-003, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 10 \u0440\u0430\u0437 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u043c\u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440, \u0430 \u043f\u0440\u0438 \u0442\u043e\u043d\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0445\u0435\u043c \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 SQLCoder \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0435\u043c GPT-4 OpenAI, \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 (\u043d\u0430 A100 GPU).<\/p>\n<p>\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <strong>SQLCoder<\/strong>:<\/p>\n<ul>\n<li>\n<p> \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0437 <a href=\"https:\/\/huggingface.co\/defog\/sqlcoder\"><u>Hugging Face<\/u><\/a>;<\/p>\n<\/li>\n<li>\n<p> \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0435\u043c\u043e-\u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/defog.ai\/sqlcoder-demo\/\"><u>\u0432\u0435\u0431-\u0441\u0430\u0439\u0442<\/u><\/a>;<\/p>\n<\/li>\n<li>\n<p> \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0431\u043b\u043e\u043a\u043d\u043e\u0442 \u0432 <a href=\"https:\/\/colab.research.google.com\/drive\/13BIKsqHnPOBcQ-ba2p77L5saiepTIwu0#scrollTo=ZpbVgVHMkJvC\"><u>Colab<\/u><\/a>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>SQLthroughAI<\/strong> \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043e\u0442 Open AI. \u041d\u0430 <a href=\"https:\/\/sqlthroughai.com\/\"><u>\u0441\u0430\u0439\u0442\u0435<\/u><\/a> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u0430\u043b\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u044b\u043b\u0430 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043d\u043e \u0437\u0430 \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c: SQLtroughAI@gmail.com.  <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u044f \u0432\u044b\u0431\u0440\u0430\u043b\u0430 \u044d\u0442\u043e\u0442 AI-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a? \u041e\u043d \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 API key \u0438 \u0438\u043c\u0435\u0435\u0442 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<h2>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/h2>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0445\u043e\u0442\u0435\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0433 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u0432\u0441\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0440\u044f\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u0436\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0443, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043f\u043e\u043c\u043e\u0447\u044c \u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<p>\u0425\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f SQLthroughAI \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a, AI-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 SQL-\u043e\u0442\u0432\u0435\u0442\u044b.<\/p>\n<p>\u0412\u0441\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0432\u0437\u044f\u0442\u044b c \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/sql-academy.org\/ru\/trainer\"><u>sql-academy<\/u><\/a>. \u0412\u044b\u0431\u0435\u0440\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u00ab\u0410\u0432\u0438\u0430\u043f\u0435\u0440\u0435\u043b\u0435\u0442\u044b\u00bb \u0438 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f. \u0421\u043e\u0437\u0434\u0430\u043c \u0435\u0451 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DDL (\u044f\u0437\u044b\u043a\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445). \u0422\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u043c\u0442\u043e\u043c \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 SQLCoder \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c MySQL, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0430\u0439\u0442 sql-academy \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0434\u0438\u0430\u043b\u0435\u043a\u0442\u0435.<\/p>\n<p>\u0414\u043b\u044f SQLthroughAI \u0441\u043e\u0437\u0434\u0430\u043c \u0441\u0445\u0435\u043c\u0443 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u044e \u0441\u0432\u044f\u0437\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u043f\u0440\u043e\u043c\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u0438\u0430\u043b\u0435\u043a\u0442, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; MySQL.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0430 AI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 Airbnb.<\/p>\n<h3>\u0410\u0432\u0438\u0430\u043f\u0435\u0440\u0435\u043b\u0435\u0442\u044b<\/h3>\n<details class=\"spoiler\">\n<summary>SQLCoder<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>CREATE TABLE trip( id INT PRIMARY KEY, company INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438-\u043f\u0435\u0440\u0435\u0432\u043e\u0437\u0447\u0438\u043a\u0430 plane VARCHAR, -- \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430 town_from VARCHAR, -- \u0433\u043e\u0440\u043e\u0434 \u0432\u044b\u043b\u0435\u0442\u0430 town_to VARCHAR, -- \u0433\u043e\u0440\u043e\u0434 \u043f\u0440\u0438\u043b\u0451\u0442\u0430 time_out DATETIME, -- \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043b\u0435\u0442\u0430 time_in DATETIME -- \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u043b\u0451\u0442\u0430 );   CREATE TABLE company( id INT PRIMARY KEY, name VARCHAR -- \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438-\u043f\u0435\u0440\u0435\u0432\u043e\u0437\u0447\u0438\u043a\u0430 );  CREATE TABLE pass_in_trip( id INT PRIMARY KEY, trip INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u0438\u043b\u0435\u0442\u0430 passenger INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 place VARCHAR -- \u043c\u0435\u0441\u0442\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 \u0432 \u0441\u0430\u043c\u043e\u043b\u0451\u0442\u0435 );  CREATE TABLE passenger( id INT PRIMARY KEY, name VARCHAR -- \u0438\u043c\u044f \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0430 );<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>SQLthroughAI<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"\">\n<div><figcaption> \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e 4 \u0442\u0438\u043f\u0430 \u043f\u043e\u043b\u044f (string, date, number, id).<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"\"><\/figure>\n<figure class=\"\"><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<h3>Airbnb<\/h3>\n<details class=\"spoiler\">\n<summary>SQLCoder<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>-- \u043e\u0442\u0437\u044b\u0432\u044b \u043d\u0430 \u0430\u0440\u0435\u043d\u0434\u0443\u0435\u043c\u043e\u0435 \u0436\u0438\u043b\u044c\u0435 CREATE TABLE Reviews(  id INT PRIMARY KEY, reservation_id INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u0440\u043e\u043d\u0438 rating INT, -- \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u043e\u0442 1 \u0434\u043e 5 );   -- \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f CREATE TABLE users( id INT PRIMARY KEY, name VARCHAR, -- \u0438\u043c\u044f \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f email VARCHAR, -- \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u043f\u043e\u0447\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f email_verified_at DATETIME, -- \u0434\u0430\u0442\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u0447\u0442\u044b password VARCHAR, -- \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 phone_number VARCHAR -- \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f );  -- \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0436\u0438\u043b\u044c\u044f CREATE TABLE Reservations( id INT PRIMARY KEY, user_id INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440  \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f room_id INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440  \u0436\u0438\u043b\u044c\u044f start_date DATETIME, -- \u0434\u0430\u0442\u0430 \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f end_date DATETIME, -- \u0434\u0430\u0442\u0430 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f price INT, -- \u0446\u0435\u043d\u0430 \u0437\u0430 \u0441\u0443\u0442\u043a\u0438 total INT -- \u043e\u0431\u0449\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f );  -- \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0436\u0438\u043b\u044c\u044f CREATE TABLE Rooms( id INT PRIMARY KEY, home_type VARCHAR, -- \u0442\u0438\u043f \u0436\u0438\u043b\u044c\u044f address VARCHAR, -- \u0430\u0434\u0440\u0435\u0441 \u0436\u0438\u043b\u044c\u044f has_tv BOOLEAN, -- \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u0430 has_internet BOOLEAN, -- \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 has_kitchen BOOLEAN, -- \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u0443\u0445\u043d\u0438 has_air_con BOOLEAN, -- \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u043d\u0434\u0438\u0446\u0438\u043e\u043d\u0435\u0440\u0430 price INT, -- \u0446\u0435\u043d\u0430 \u0437\u0430 \u0441\u0443\u0442\u043a\u0438 owner_id INT, -- \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 latitude FLOAT, -- \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0448\u0438\u0440\u043e\u0442\u0430 longitude FLOAT -- \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0434\u043e\u043b\u0433\u043e\u0442\u0430 );<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>SQLthroughAI<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><\/figure>\n<figure class=\"\">\n<div><figcaption> \u0412\u044b\u0431\u0438\u0440\u0430\u044e \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/details>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h3>\n<p>\u2116 55:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>NL-query (\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\">\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0438\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0439\u0441\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>SQL query (\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 SQL-\u0437\u0430\u043f\u0440\u043e\u0441)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>SQLCoder (<em>\u043d\u0435\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"> <strong>SQLthroughAI (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> <code>WITH min_trip_count AS (<\/code><\/p>\n<p><code> SELECT company, count(*) AS trip_count<\/code><\/p>\n<p><code> FROM trip<\/code><\/p>\n<p><code> GROUP BY company<\/code><\/p>\n<p><code> ORDER BY trip_count ASC<\/code><\/p>\n<p><code> LIMIT 1)<\/code><\/p>\n<p><code> DELETE FROM company<\/code><\/p>\n<p><code> WHERE id IN (SELECT company<\/code><\/p>\n<p><code> FROM min_trip_count)<\/code><\/p>\n<\/td>\n<td>\n<p> <code>DELETE FROM company<\/code><\/p>\n<p><code> WHERE id IN  <\/code><\/p>\n<p><code> (SELECT t.company  <\/code><\/p>\n<p><code> FROM trip t  <\/code><\/p>\n<p><code> GROUP BY t.company<\/code><\/p>\n<p><code> HAVING COUNT(*) =  <\/code><\/p>\n<p><code> (SELECT MIN(count_flights)  <\/code><\/p>\n<p><code> FROM (SELECT COUNT(*) AS count_flights  <\/code><\/p>\n<p><code> FROM trip  <\/code><\/p>\n<p><code> GROUP BY company ) AS subquery ) );<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h4>\n<p>\u0412 \u0447\u0451\u043c \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0442 SQLCoder? \u041c\u043e\u0434\u0435\u043b\u044c \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0439\u0441\u043e\u0432. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u0430\u0436\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0430 \u0440\u0435\u0448\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<h3>\u2116 58:<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>NL-query <\/strong> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\">\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0437\u044b\u0432 \u0441 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u043e\u043c 5 \u043d\u0430 \u0436\u0438\u043b\u044c\u0435, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 &#171;11218, Friel Place, New York&#187;, \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 &#171;George Clooney&#187;.<\/p>\n<p align=\"left\">\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 (id) \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 + 1.<\/p>\n<p align=\"left\">\u0420\u0435\u0437\u0435\u0440\u0432\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043d\u0430\u0442\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0437\u044b\u0432, \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u0430, \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0435\u0451 \u043d\u0430\u0439\u0442\u0438.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>SQL query<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>SQLCoder (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>SQLthroughAI (<em>\u043d\u0435\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> <code>INSERT INTO reviews (id, rating, reservation_id)<\/code><\/p>\n<p><code> VALUES (<\/code><\/p>\n<p><code> (SELECT COUNT(*) + 1 FROM reviews as a),<\/code><\/p>\n<p><code> 5,<\/code><\/p>\n<p><code> (SELECT r.id<\/code><\/p>\n<p><code> FROM reservations r  <\/code><\/p>\n<p><code> JOIN rooms r1 on r.room_id = r1.id<\/code><\/p>\n<p><code> WHERE r1.address = '11218, Friel Place, New York'<\/code><\/p>\n<p><code> and r.user_id = (SELECT u.id FROM users u WHERE u.name = 'George Clooney')));<\/code><\/p>\n<\/td>\n<td>\n<p> <code>INSERT INTO Reviews (id, reservation_id, rating)  <\/code><\/p>\n<p><code> VALUES (<\/code><\/p>\n<p><code> (SELECT COUNT(*)+1 FROM Reviews),<\/code><\/p>\n<p><code> (SELECT id  <\/code><\/p>\n<p><code>     FROM Reservations  <\/code><\/p>\n<p><code>     WHERE room_id = (SELECT id FROM Rooms WHERE address = \"11218, Friel Place, New York\")),<\/code><\/p>\n<p><code> 5);<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h4>\n<p>SQLthroughAI \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c (<code>name = 'George Clooney'<\/code>), \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<h3>\u2116 68:<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>NL-query <\/strong> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\">\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u043d\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043d\u0438\u043c\u0430\u043b\u0438 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 1 \u0440\u0430\u0437, \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u0441\u043d\u0438\u043c\u0430\u0432\u0448\u0435\u0433\u043e \u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437, \u0438 \u0434\u0430\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0432\u044b\u0435\u0445\u0430\u043b.<\/p>\n<p align=\"left\">\u041f\u043e\u043b\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/p>\n<p align=\"left\"><code>room_id<\/code><\/p>\n<p align=\"left\"><code>name<\/code><\/p>\n<p align=\"left\"><code>end_date<\/code><\/p>\n<p align=\"left\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e &#171;<code>as room_id<\/code>&#187; \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u043c\u043d\u0430\u0442\u044b.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p align=\"left\"><strong>SQL query<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>SQLCoder (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>SQLthroughAI (<em>\u0432\u0435\u0440\u043d\u043e<\/em>)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> <code>WITH last_seen AS (<\/code><\/p>\n<p><code> SELECT r.room_id, u.name, r.end_date FROM reservations r join users u on r.user_id = u.id  <\/code><\/p>\n<p><code> WHERE  r.start_date = (SELECT max(start_date)  <\/code><\/p>\n<p><code> FROM reservations<\/code><\/p>\n<p><code><\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-358314","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/358314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=358314"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/358314\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=358314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=358314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=358314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}