ecaccam commited on
Commit
d0b46f7
·
verified ·
1 Parent(s): d144682

Upload dataset_sft.csv

Browse files
Files changed (1) hide show
  1. dataset_sft.csv +175 -0
dataset_sft.csv ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ text
2
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
3
+
4
+ ### Instruction: Show me all active tasks assigned to Aaron Aco
5
+
6
+ ### Response: SELECT task_name, task_description, story_point_est FROM main_tasks INNER JOIN task_assignees ON main_tasks.id = task_assignees.main_task_id INNER JOIN users ON task_assignees.assignee_user_id = users.id WHERE first_name = 'Aaron' AND last_name = 'Aco' AND is_archived = FALSE GROUP BY main_tasks.id ORDER BY main_tasks.created_at DESC;
7
+ "
8
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
9
+
10
+ ### Instruction: What's the total hours Japho Palit-ang spent on tasks between July 1-15, 2024?
11
+
12
+ ### Response: SELECT SUM(dtr_task_time_spents.hours_spent) AS total_hours FROM dtr_task_time_spents INNER JOIN users ON dtr_task_time_spents.user_id = users.id WHERE users.first_name = 'Japho' AND users.last_name = 'Palit-ang' AND dtr_task_time_spents.work_date BETWEEN '2024-07-01' AND '2024-07-15'
13
+ "
14
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
15
+
16
+ ### Instruction: List all projects that Jerick Arlantico is currently working on as of August 15, 2024
17
+
18
+ ### Response: SELECT title FROM projects INNER JOIN user_projects ON projects.id = user_projects.project_id INNER JOIN users ON user_projects.user_id = users.id WHERE users.first_name = 'Jerick' AND users.last_name = 'Arlantico' AND projects.is_active = TRUE AND user_projects.is_active = TRUE AND user_projects.created_at <= '2024-08-15'"
19
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
20
+
21
+ ### Instruction: What tasks did Jaybee Balog finish in the first week of June 2024?
22
+
23
+ ### Response: SELECT main_tasks.id, main_tasks.task_name, task_progresses.progress_percent, task_progresses.created_at FROM main_tasks INNER JOIN task_progresses ON main_tasks.id = task_progresses.main_task_id INNER JOIN task_assignees ON main_tasks.id = task_assignees.main_task_id INNER JOIN users ON task_assignees.assignee_user_id = users.id WHERE users.first_name = 'Jaybee' AND users.last_name = 'Balog' AND task_progresses.progress_percent = 100 AND task_progresses.created_at BETWEEN '2024-06-01' AND '2024-06-07' GROUP BY main_tasks.id;
24
+ "
25
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
26
+
27
+ ### Instruction: Which tasks took the most time in the week of September 9-13, 2024? Show me the top 5
28
+
29
+ ### Response: SELECT main_tasks.task_name, projects.title AS project_name, SUM(dtr_task_time_spents.hours_spent) AS total_hours FROM main_tasks INNER JOIN dtr_task_time_spents ON main_tasks.id = dtr_task_time_spents.main_task_id INNER JOIN projects ON main_tasks.project_id = projects.id WHERE dtr_task_time_spents.work_date BETWEEN '2024-09-09' AND '2024-09-13' GROUP BY main_tasks.task_name , projects.title ORDER BY total_hours DESC LIMIT 5;
30
+ "
31
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
32
+
33
+ ### Instruction: How many hours has Aaron Aco worked on each project in May 2024?
34
+
35
+ ### Response: SELECT projects.title AS project_name, SUM(dtr_task_time_spents.hours_spent) AS total_hours FROM dtr_task_time_spents INNER JOIN projects ON dtr_task_time_spents.project_id = projects.id INNER JOIN users ON dtr_task_time_spents.user_id = users.id WHERE users.first_name = 'Aaron' AND users.last_name = 'Aco' AND dtr_task_time_spents.work_date BETWEEN '2024-05-01' AND '2024-05-31' GROUP BY projects.id ORDER BY total_hours DESC;
36
+ "
37
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
38
+
39
+ ### Instruction: List all attachments uploaded by Japho Palit-ang between March 15 to June 15, 2024
40
+
41
+ ### Response: SELECT main_tasks.task_name, attachments.url FROM attachments INNER JOIN users ON attachments.user_id = users.id INNER JOIN main_tasks ON attachments.project_id = main_tasks.project_id WHERE users.first_name = 'Japho' AND users.last_name = 'Palit-ang' AND attachments.created_at BETWEEN '2024-03-15' AND '2024-06-15' ORDER BY attachments.created_at DESC;
42
+ "
43
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
44
+
45
+ ### Instruction: What's the total hours spent by each team member on their assigned tasks in July 2024?
46
+
47
+ ### Response: SELECT users.first_name, users.last_name, SUM(dtr_task_time_spents.hours_spent) AS total_hours FROM dtr_task_time_spents dts INNER JOIN users u ON dtr_task_time_spents.user_id = users.id WHERE dtr_task_time_spents.work_date BETWEEN '2024-07-01' AND '2024-07-31' GROUP BY users.id ORDER BY total_hours DESC;
48
+ "
49
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
50
+
51
+ ### Instruction: Show me all users who were late in June 2024, with their late count
52
+
53
+ ### Response: SELECT users.first_name, users.last_name, COUNT(activities.id) AS times_late FROM activities INNER JOIN users ON activities.user_id = users.id WHERE activities.is_late = TRUE AND activities.started_at >= '2024-06-01' AND activities.started_at < '2024-07-01' GROUP BY users.id ORDER BY times_late DESC;
54
+ "
55
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
56
+
57
+ ### Instruction: Show bookmark activity between July and September 2024
58
+
59
+ ### Response: SELECT DATE(created_at) as bookmark_date, COUNT(*) as total_bookmarks, COUNT(DISTINCT company_id) as companies_with_bookmarks, COUNT(DISTINCT user_id) as users_with_bookmarks FROM task_bookmarks WHERE created_at BETWEEN '2024-07-01' AND '2024-09-19' GROUP BY DATE(created_at) ORDER BY bookmark_date;
60
+ "
61
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
62
+
63
+ ### Instruction: Show me all active projects and their task counts as of September 1, 2024
64
+
65
+ ### Response: SELECT projects.title AS project_name, COUNT(DISTINCT main_tasks.id) AS main_tasks_count, COUNT(DISTINCT sub_tasks.id) AS subtasks_count FROM projects LEFT JOIN main_tasks ON projects.id = main_tasks.project_id AND main_tasks.is_archived = FALSE LEFT JOIN sub_tasks ON main_tasks.id = sub_tasks.main_task_id AND sub_tasks.is_archived = FALSE WHERE projects.is_active = TRUE AND projects.created_at <= '2024-09-01' GROUP BY projects.id ORDER BY projects.title;
66
+ "
67
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
68
+
69
+ ### Instruction: How many users are still active ?
70
+
71
+ ### Response: SELECT count(*) FROM users WHERE is_active = 1
72
+ "
73
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
74
+
75
+ ### Instruction: How many times was Paul Samuel Lacap late in August 2024?
76
+
77
+ ### Response: SELECT users.*, activities.* FROM users INNER JOIN activities ON users.id = activities.user_id WHERE CONCAT(first_name, ' ', last_name) = 'Paul Samuel Lacap' AND activities.is_late = 1 AND NOT DAYOFWEEK(activities.started_at) IN (1,7) AND MONTH(activities.started_at) = 8 and YEAR(activities.started_at) = 2024
78
+ "
79
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
80
+
81
+ ### Instruction: How many employees did extra miles in the month of May?
82
+
83
+ ### Response: SELECT COUNT(*) AS extra_mile_users FROM( SELECT user_id, AVG(total_hours_spent) AS average_time_spent FROM daily_time_reports WHERE MONTH(work_date) = 5 AND YEAR(work_date) = 2024 GROUP BY user_id HAVING average_time_spent > 8.15 ) AS extra_mile_table
84
+ "
85
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
86
+
87
+ ### Instruction: How many hours did Paul Lacap spent yesterday?
88
+
89
+ ### Response: SELECT total_hours_spent FROM daily_time_reports INNER JOIN users ON daily_time_reports.user_id = users.id WHERE CONCAT(first_name, ' ', last_name) = 'Paul Samuel Lacap' AND work_date = work_date = CURDATE() - INTERVAL 1 DAY;
90
+ "
91
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
92
+
93
+ ### Instruction: What is the total amount of time JP Ruelo spent on PTO (Personal Time Off) last year?
94
+
95
+ ### Response: SELECT SUM(time_spent)/3600 AS break_time_hours FROM activities INNER JOIN users ON activities.user_id = users.id WHERE YEAR(started_at) = YEAR(CURDATE()) AND CONCAT(first_name, ' ', last_name) = 'John Paulo Ruelo';
96
+ "
97
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
98
+
99
+ ### Instruction: How many times did employees went to the hospital?
100
+
101
+ ### Response: SELECT COUNT(*) AS hospital_count FROM activities WHERE notes LIKE '%hospital%'
102
+ "
103
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
104
+
105
+ ### Instruction: How long did each employee spend time on lunch break this year?
106
+
107
+ ### Response: SELECT user_id, users.first_name, users.last_name, SUM(time_spent)/3600 AS hours_spent FROM activities INNER JOIN users ON activities.user_id = users.id WHERE notes LIKE '%lunch%' AND YEAR(started_at) = YEAR(CURDATE()) GROUP BY user_id;
108
+ "
109
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
110
+
111
+ ### Instruction: Have Paul sent his daily time report today?
112
+
113
+ ### Response: SELECT is_sent FROM daily_time_reports INNER JOIN users ON daily_time_reports.user_id = users.id WHERE (first_name LIKE '%Paul%' OR last_name LIKE '%Paul%') AND is_sent = 1 AND sent_date = curdate()
114
+ "
115
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
116
+
117
+ ### Instruction: Who are on break at the moment?
118
+
119
+ ### Response: SELECT activities.user_id, users.first_name, users.last_name, activities.started_at, activities.expected_end_at, activities.ended_at FROM activities INNER JOIN users ON activities.user_id = users.id WHERE ended_at IS NULL AND started_at = CURDATE();"
120
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
121
+
122
+ ### Instruction: List all the names of the employees who did not work on July 7, 2024
123
+
124
+ ### Response: SELECT users.id, users.first_name, users.last_name, daily_time_reports.is_sent FROM users LEFT JOIN daily_time_reports ON users.id = daily_time_reports.user_id AND daily_time_reports.sent_date = '2024-07-07' AND daily_time_reports.is_sent = NULL
125
+ "
126
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
127
+
128
+ ### Instruction: Show all users whose leaves are approved between February and April 2024
129
+
130
+ ### Response: SELECT first_name, last_name leave_date, reasons FROM leaves INNER JOIN users ON users.id = leaves.user_id WHERE leaves.leave_date BETWEEN '2024-02-01' AND '2024-04-30' AND leaves.is_approved = TRUE ORDER BY leaves.leave_date;
131
+ "
132
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
133
+
134
+ ### Instruction: Show cancelled leave requests in September 2024
135
+
136
+ ### Response: SELECT first_name, last_name, leave_date, reasons FROM leaves INNER JOIN users ON users.id = leaves.user_id WHERE leaves.leave_date BETWEEN '2024-09-01' AND '2024-09-19' AND leaves.is_cancelled = TRUE ORDER BY leaves.leave_date;
137
+ "
138
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
139
+
140
+ ### Instruction: List all pending leave requests for August 2024
141
+
142
+ ### Response: SELECT leave_approvals.awarded_by_user_id, leave_approvals.created_at AS approval_created_at FROM leaves INNER JOIN leave_approvals ON leaves.id = leave_approvals.leave_id WHERE leaves.is_approved = 0 AND leaves.is_cancelled = 0 AND leaves.leave_date BETWEEN '2024-07-01' AND '2024-08-31';
143
+ "
144
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
145
+
146
+ ### Instruction: Which employees have used the most leave credits in the past month?
147
+
148
+ ### Response: SELECT first_name, last_name, SUM(leaves.credit_consumed) AS total_credits_used FROM leaves INNER JOIN users ON users.id = leaves.user_id WHERE leaves.is_approved = 1 AND leaves.leave_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY leaves.user_id ORDER BY total_credits_used DESC LIMIT 1;
149
+ "
150
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
151
+
152
+ ### Instruction: How many leaves have been approved and how many are still pending?
153
+
154
+ ### Response: SELECT COUNT(CASE WHEN leaves.is_approved = 1 THEN 1 END) AS approved_leaves, COUNT(CASE WHEN leaves.is_approved = 0 THEN 1 END) AS pending_leaves FROM leaves;"
155
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
156
+
157
+ ### Instruction: Are there employees who have never taken leave?
158
+
159
+ ### Response: SELECT first_name, last_name FROM users LEFT JOIN leaves ON leaves.user_id = users.id WHERE leaves.user_id IS NULL;"
160
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
161
+
162
+ ### Instruction: Are there specific months or seasons where leave requests peak?
163
+
164
+ ### Response: SELECT DATE_FORMAT(leave_date, '%M') AS month_name, COUNT(id) AS total_leaves FROM leaves WHERE is_cancelled = 0 GROUP BY MONTH(leave_date) ORDER BY total_leaves DESC LIMIT 3;
165
+ "
166
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
167
+
168
+ ### Instruction: Who has the most sick leaves?
169
+
170
+ ### Response: SELECT CONCAT(users.first_name, ' ', users.last_name) AS full_name, COUNT(leaves.id) AS sick_leave_count FROM users INNER JOIN leaves ON users.id = leaves.user_id INNER JOIN leave_types ON leaves.leave_type_id = leave_types.id WHERE leave_types.id = 2 AND leaves.is_cancelled = 0 GROUP BY users.id ORDER BY sick_leave_count DESC LIMIT 1;"
171
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.
172
+
173
+ ### Instruction: What is the most common reason employees provide for taking leave?
174
+
175
+ ### Response: SELECT reasons, COUNT(id) AS frequency FROM leaves WHERE is_cancelled = 0 GROUP BY reasons ORDER BY frequency DESC LIMIT 3;"