https://ft2yjvntt2x0kkx-db202003241427.adb.us-ashburn-1.oraclecloudapps.com/ords/excel/_/sql?client=msExcelOfficeOnline

{"statementText":"SELECT DBMS_CLOUD_AI.GENERATE(\n    prompt => 'provide 3 sample analysis questions on MOVIESTREAM_SALES_1 table in less than 10 words per question. These questions should have a SQL query that could run on the MOVIESTREAM_SALES_1 table. Use phrases like top 5, top 3, average, maximum, minimum, total and sum with column names of MOVIESTREAM_SALES_1 table to create these questions. Format the output as a JSON array with only the questions. Dont give any other information besides that JSON array.',\n    profile_name => 'OPENAI',\n    action => 'chat',\n    attributes => '{\"object_list\":[{\"owner\":\"excel\",\"name\":\"MOVIESTREAM_SALES_1\"}],\"temperature\":0}'\n  ) FROM dual;","offset":0,"limit":10000}




{"env":{"defaultTimeZone":"UTC"},"items":[{"statementId":1,"statementType":"query","statementPos":{"startLine":1,"endLine":6},"statementText":"SELECT DBMS_CLOUD_AI.GENERATE(\n    prompt => 'provide 3 sample analysis questions on MOVIESTREAM_SALES_1 table in less than 10 words per question. These questions should have a SQL query that could run on the MOVIESTREAM_SALES_1 table. Use phrases like top 5, top 3, average, maximum, minimum, total and sum with column names of MOVIESTREAM_SALES_1 table to create these questions. Format the output as a JSON array with only the questions. Dont give any other information besides that JSON array.',\n    profile_name => 'OPENAI',\n    action => 'chat',\n    attributes => '{\"object_list\":[{\"owner\":\"excel\",\"name\":\"MOVIESTREAM_SALES_1\"}],\"temperature\":0}'\n  ) FROM dual","resultSet":{"metadata":[{"columnName":"DBMS_CLOUD_AI.GENERATE(PROMPT=>'PROVIDE3SAMPLEANALYSISQUESTIONSONMOVIESTREAM_SALES_1TABLEINLESSTHAN10WORDSPERQUESTION.THESEQUESTIONSSHOULDHAVEASQLQUERYTHATCOULDRUNONTHEMOVIESTREAM_SALES_1TABLE.USEPHRASESLIKETOP5,TOP3,AVERAGE,MAXIMUM,MINIMUM,TOTALANDSU","jsonColumnName":"dbms_cloud_ai.generate(prompt=>'provide3sampleanalysisquestionsonmoviestream_sales_1tableinlessthan10wordsperquestion.thesequestionsshouldhaveasqlquerythatcouldrunonthemoviestream_sales_1table.usephrasesliketop5,top3,average,maximum,minimum,totalandsu","columnTypeName":"CLOB","columnClassName":"oracle.jdbc.OracleClob","precision":-1,"scale":0,"isNullable":1}],"items":[{"dbms_cloud_ai.generate(prompt=>'provide3sampleanalysisquestionsonmoviestream_sales_1tableinlessthan10wordsperquestion.thesequestionsshouldhaveasqlquerythatcouldrunonthemoviestream_sales_1table.usephrasesliketop5,top3,average,maximum,minimum,totalandsu":"[\n  \"What is the total sales amount?\",\n  \"What are the top 5 highest sales amounts?\",\n  \"What is the average sales amount?\"\n]"}],"hasMore":false,"limit":10000,"offset":0,"count":1},"response":[],"result":0}]}




https://ft2yjvntt2x0kkx-db202003241427.adb.us-ashburn-1.oraclecloudapps.com/ords/excel/_/sql?client=msExcelOfficeOnline

{"statementText":"SELECT DBMS_CLOUD_AI.GENERATE(\n    prompt => 'Include only distinct values in the answer. Do not include null vales in the answer. Limit result to 100 rows. Question:What is the total revenue generated from movie sales? SQL:',\n    profile_name => 'OPENAI',\n    action => 'showsql',\n    attributes => '{\"object_list\":[{\"owner\":\"excel\",\"name\":\"MOVIESTREAM_SALES_1\"}],\"temperature\":0}'\n  ) FROM dual;","offset":0,"limit":10000}

{"env":{"defaultTimeZone":"UTC"},"items":[{"statementId":1,"statementType":"query","statementPos":{"startLine":1,"endLine":6},"statementText":"SELECT DBMS_CLOUD_AI.GENERATE(\n    prompt => 'Include only distinct values in the answer. Do not include null vales in the answer. Limit result to 100 rows. Question:What is the total revenue generated from movie sales? SQL:',\n    profile_name => 'OPENAI',\n    action => 'showsql',\n    attributes => '{\"object_list\":[{\"owner\":\"excel\",\"name\":\"MOVIESTREAM_SALES_1\"}],\"temperature\":0}'\n  ) FROM dual","resultSet":{"metadata":[{"columnName":"DBMS_CLOUD_AI.GENERATE(PROMPT=>'INCLUDEONLYDISTINCTVALUESINTHEANSWER.DONOTINCLUDENULLVALESINTHEANSWER.LIMITRESULTTO100ROWS.QUESTION:WHATISTHETOTALREVENUEGENERATEDFROMMOVIESALES?SQL:',PROFILE_NAME=>'OPENAI',ACTION=>'SHOWSQL',ATTRIBUTES=>'{\"OBJECT_LIST\"","jsonColumnName":"dbms_cloud_ai.generate(prompt=>'includeonlydistinctvaluesintheanswer.donotincludenullvalesintheanswer.limitresultto100rows.question:whatisthetotalrevenuegeneratedfrommoviesales?sql:',profile_name=>'openai',action=>'showsql',attributes=>'{\"object_list","columnTypeName":"CLOB","columnClassName":"oracle.jdbc.OracleClob","precision":-1,"scale":0,"isNullable":1}],"items":[{"dbms_cloud_ai.generate(prompt=>'includeonlydistinctvaluesintheanswer.donotincludenullvalesintheanswer.limitresultto100rows.question:whatisthetotalrevenuegeneratedfrommoviesales?sql:',profile_name=>'openai',action=>'showsql',attributes=>'{\"object_list":"SELECT SUM(\"PRICE_PAID\") AS total_revenue\nFROM \"EXCEL\".\"MOVIESTREAM_SALES_1\""}],"hasMore":false,"limit":10000,"offset":0,"count":1},"response":[],"result":0}]}

/ords/excel/_/sql
{"statementText":"SELECT DBMS_CLOUD_AI.GENERATE(\n      prompt => 'revenue',\n      profile_name => 'OPENAI',\n      attributes => '{\"object_list\":[{\"owner\":\"excel\",\"name\":\"MOVIESTREAM_SALES_1\"}]}'\n  ) FROM dual;","offset":0,"limit":10000}

{"env":{"defaultTimeZone":"UTC"},"items":[{"statementId":1,"statementType":"query","statementPos":{"startLine":1,"endLine":5},"statementText":"SELECT DBMS_CLOUD_AI.GENERATE(\n      prompt => 'revenue',\n      profile_name => 'OPENAI',\n      attributes => '{\"object_list\":[{\"owner\":\"excel\",\"name\":\"MOVIESTREAM_SALES_1\"}]}'\n  ) FROM dual","resultSet":{"metadata":[{"columnName":"DBMS_CLOUD_AI.GENERATE(PROMPT=>'REVENUE',PROFILE_NAME=>'OPENAI',ATTRIBUTES=>'{\"OBJECT_LIST\":[{\"OWNER\":\"EXCEL\",\"NAME\":\"MOVIESTREAM_SALES_1\"}]}')","jsonColumnName":"dbms_cloud_ai.generate(prompt=>'revenue',profile_name=>'openai',attributes=>'{\"object_list\":[{\"owner\":\"excel\",\"name\":\"moviestream_sales_1\"}]}')","columnTypeName":"CLOB","columnClassName":"oracle.jdbc.OracleClob","precision":-1,"scale":0,"isNullable":1}],"items":[{"dbms_cloud_ai.generate(prompt=>'revenue',profile_name=>'openai',attributes=>'{\"object_list\":[{\"owner\":\"excel\",\"name\":\"moviestream_sales_1\"}]}')":"SELECT \n    SUM(\"QUANTITY_SOLD\" * \"PRICE_PAID\" * (1 - \"DISCOUNT_PERCENT\" / 100)) AS revenue\nFROM \n    \"EXCEL\".\"MOVIESTREAM_SALES_1\" s"}],"hasMore":false,"limit":10000,"offset":0,"count":1},"response":[],"result":0}]}

/ords/excel/_/sql

{"statementText":"SELECT\n    SUM(\"QUANTITY_SOLD\" * \"PRICE_PAID\" *(1 - \"DISCOUNT_PERCENT\" / 100)) AS REVENUE\nFROM\n    \"EXCEL\".\"MOVIESTREAM_SALES_1\" S","offset":0,"limit":10000}

{"env":{"defaultTimeZone":"UTC"},"items":[{"statementId":1,"statementType":"query","statementPos":{"startLine":1,"endLine":5},"statementText":"SELECT\n    SUM(\"QUANTITY_SOLD\" * \"PRICE_PAID\" *(1 - \"DISCOUNT_PERCENT\" / 100)) AS REVENUE\nFROM\n    \"EXCEL\".\"MOVIESTREAM_SALES_1\" S","resultSet":{"metadata":[{"columnName":"REVENUE","jsonColumnName":"revenue","columnTypeName":"NUMBER","columnClassName":"java.math.BigDecimal","precision":0,"scale":-127,"isNullable":1}],"items":[{"revenue":106291.47959}],"hasMore":false,"limit":10000,"offset":0,"count":1},"response":[],"result":0}]}l
