Project import generated by Copybara.

GitOrigin-RevId: d9e9e3fb4e31372ec1fb43b178994ca78fa8fe70
diff --git a/tools/ml/issue-training-export.sql b/tools/ml/issue-training-export.sql
new file mode 100644
index 0000000..73a637b
--- /dev/null
+++ b/tools/ml/issue-training-export.sql
@@ -0,0 +1,17 @@
+select
+  IF(v.is_spam, "spam", "ham"),
+  REPLACE(s.summary, '\n', '\r'),
+  REPLACE(cc.content, '\n', '\r'),
+  u.email,
+  CONCAT("https://bugs.chromium.org/p/", p.project_name, "/issues/detail?id=", i.local_id),
+  r.email
+from SpamVerdict v
+  join Issue i on i.id = v.issue_id
+  join Comment c on c.issue_id = i.id
+  join CommentContent cc on cc.comment_id = c.id
+  join IssueSummary s on s.issue_id = i.id
+  join Project p on p.project_id = i.project_id
+  join User u on u.user_id = c.commenter_id
+  join User r on r.user_id = v.user_id
+where
+  v.reason='manual' and v.overruled = 0;