ossinsight
ossinsight copied to clipboard
cannot format some sql
e.g.
WITH pingcap_repos AS (SELECT repo_id FROM github_repos WHERE owner_login = 'pingcap' AND is_archived = 0 AND is_deleted = 0), pingcap_events AS (SELECT actor_id, actor_login, repo_id, repo_name, type, action, created_at FROM github_events WHERE repo_id IN (SELECT repo_id FROM pingcap_repos) AND actor_login NOT LIKE '%bot%'), pingcap_users AS (SELECT id, login, country_code FROM github_users WHERE id IN (SELECT actor_id FROM pingcap_events)), pingcap_topics AS (SELECT repo_id, topic FROM github_repo_topics WHERE repo_id IN (SELECT repo_id FROM pingcap_repos)) SELECT COUNT(DISTINCT repo_id) AS 'No1: How many repos does pingcap have?', COUNT(DISTINCT actor_id) AS 'No2: How many users have contributed to pingcap's repos?', (SELECT GROUP_CONCAT(DISTINCT topic ORDER BY COUNT(*) DESC SEPARATOR ', ') FROM pingcap_topics GROUP BY repo_id ORDER BY COUNT(*) DESC LIMIT 1) AS 'No3: What are the most popular topics related to pingcap's repos?', (SELECT GROUP_CONCAT(DISTINCT country_code ORDER BY COUNT(*) DESC SEPARATOR ', ') FROM pingcap_users GROUP BY country_code ORDER BY COUNT(*) DESC LIMIT 1) AS 'No4: What is the distribution of contributors' countries?' FROM pingcap_events LIMIT 20
COUNT(DISTINCT actor_id) AS 'No2: How many users have contributed to pingcap's repos?'
There may be a single quotation number in the sub-questions.
@sykp241095 Is this related to the prompt modification?
@sykp241095 I am not sure...