text stringlengths 0 5.52k |
|---|
SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1; |
SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name; |
SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song); |
SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955; |
SELECT count(*) FROM Other_Available_Features; |
SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = "AirCon"; |
SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code; |
SELECT property_name FROM Properties WHERE property_type_code = "House" UNION SELECT property_name FROM Properties WHERE property_type_code = "Apartment" AND room_count > 1; |
# SQL DDL - Database Schemas, CREATE TABLE Statements |
First, I need to use the game_marketing_create_trailer_schedule tool. The parameters needed are the schedule, which should include the three platforms with their release dates. So the schedule is an array where each element has platform and release dates. Since all three have the same date, maybe each platform's entry ... |
CREATE TABLE users ( |
id BIGINT PRIMARY KEY AUTO_INCREMENT, |
email VARCHAR(255) NOT NULL UNIQUE, |
password_hash VARCHAR(255) NOT NULL, |
first_name VARCHAR(100), |
last_name VARCHAR(100), |
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
is_active BOOLEAN DEFAULT TRUE, |
last_login TIMESTAMP NULL, |
INDEX idx_email (email), |
INDEX idx_created_at (created_at) |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
Then the analysis function. The user wants impact analysis on those platforms two weeks after release. So the time_range's start_date would be 2023-06-01 plus 14 days, and the end_date same as start? Wait, probably the end date should be two weeks after, so maybe start_date is 2023-06-01 and end_date 2023-06-15. Wait, ... |
CREATE TABLE projects ( |
id BIGINT PRIMARY KEY AUTO_INCREMENT, |
name VARCHAR(200) NOT NULL, |
description TEXT, |
owner_id BIGINT NOT NULL, |
status ENUM('planning', 'active', 'on_hold', 'completed', 'cancelled') DEFAULT 'planning', |
start_date DATE, |
deadline DATE, |
budget DECIMAL(12,2), |
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE RESTRICT, |
INDEX idx_owner (owner_id), |
INDEX idx_status (status), |
INDEX idx_deadline (deadline) |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
So the functions need to be called in that order. The first function is the schedule, then after the scheduled date (which would presumably be handled by the user or the system automatically), then the analysis function with the time_range set to two weeks after the release. Then the optimization function with the anal... |
</think> |
CREATE TABLE tasks ( |
id BIGINT PRIMARY KEY AUTO_INCREMENT, |
project_id BIGINT NOT NULL, |
assignee_id BIGINT, |
title VARCHAR(300) NOT NULL, |
description TEXT, |
status ENUM('todo', 'in_progress', 'in_review', 'done', 'blocked') DEFAULT 'todo', |
priority ENUM('low', 'medium', 'high', 'critical') DEFAULT 'medium', |
story_points INT, |
estimated_hours DECIMAL(5,2), |
actual_hours DECIMAL(5,2), |
parent_task_id BIGINT NULL, |
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
completed_at TIMESTAMP NULL, |
FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE, |
FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL, |
FOREIGN KEY (parent_task_id) REFERENCES tasks(id) ON DELETE SET NULL, |
INDEX idx_project (project_id), |
INDEX idx_assignee (assignee_id), |
INDEX idx_status (status), |
INDEX idx_priority (priority), |
INDEX idx_parent (parent_task_id) |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
Apologies, but the available tools don't support scheduling trailers at a specific date in the future without immediate execution. The `game_marketing_create_trailer_schedule` function can create a release schedule, but to trigger the actual releases, there's no direct way to queue them for a future date without manual... |
CREATE TABLE project_members ( |
project_id BIGINT NOT NULL, |
user_id BIGINT NOT NULL, |
role ENUM('owner', 'admin', 'member', 'viewer') DEFAULT 'member', |
joined_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
PRIMARY KEY (project_id, user_id), |
FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE, |
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1. Manually schedule and execute the trailer release for **2023-06-01** on Facebook, Twitter, and YouTube. |
2. Two weeks later (June 15, 2023), run the `game_marketing_analyze_trailer_impact` function with the specified platforms and date range to assess impact. |
3. Use the analysis results to feed into the `game_marketing_optimize_trailer_content` function, focusing on feedback from comment sections and prioritizing reactions and comments for optimization. |
CREATE TABLE comments ( |
id BIGINT PRIMARY KEY AUTO_INCREMENT, |
task_id BIGINT NOT NULL, |
author_id BIGINT NOT NULL, |
content TEXT NOT NULL, |
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
FOREIGN KEY (task_id) REFERENCES tasks(id) ON DELETE CASCADE, |
FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE RESTRICT, |
INDEX idx_task (task_id), |
INDEX idx_author (author_id) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.