We have information on how to access the MySQL command prompt in our documentation here:
One of our developers has shared the following SQL query that you can potentially use to find what you need:
SELECT u.username, cs.password as clipboard_id, cs.created_at, csi.item_class_name, csi.slug
FROM clipboard_save cs
LEFT JOIN user u ON u.id=cs.user_id
JOIN clipboard_save_item csi ON csi.save_id=cs.id
ORDER BY u.username, cs.created_at;
This query will list 1 row per saved record, so a clipboard with 3 saved items will have 3 rows, all with the same value in the clipboard_id column.
You can also bound it by time if you want - here's an example returning only clipboard entries created in May 2022:
SELECT u.username, cs.password as clipboard_id, cs.created_at, csi.item_class_name, csi.slug
FROM clipboard_save cs
LEFT JOIN user u ON u.id=cs.user_id
JOIN clipboard_save_item csi ON csi.save_id=cs.id
WHERE cs.created_at BETWEEN '2022-05-01' AND '2022-05-31'
ORDER BY u.username, cs.created_at;
If the user was a public user, then the entry in the username column will be NULL. However, if the user was logged in, then you can further narrow the results by username - here's an example query showing saved clipboard records from the demo user in the month of May 2022:
SELECT u.username, cs.password as clipboard_id, cs.created_at, csi.item_class_name, csi.slug
FROM clipboard_save cs
LEFT JOIN user u ON u.id=cs.user_id
JOIN clipboard_save_item csi ON csi.save_id=cs.id
WHERE u.username='demo' AND cs.created_at BETWEEN '2022-05-01' AND '2022-05-31'
ORDER BY u.username, cs.created_at;
Alternatively, return only those clipboard entries created by public users in the month of May 2022:
SELECT u.username, cs.password as clipboard_id, cs.created_at, csi.item_class_name, csi.slug
FROM clipboard_save cs
LEFT JOIN user u ON u.id=cs.user_id
JOIN clipboard_save_item csi ON csi.save_id=cs.id
WHERE u.username is NULL AND cs.created_at BETWEEN '2022-05-01' AND '2022-05-31'
ORDER BY u.username, cs.created_at;
I will try to add these queries to our SQL documentation soon, so they can be reused by others as needed.
Cheers,
@accesstomemory