Last active
July 7, 2021 08:34
-
-
Save macmladen/173a18ae42d4d95c62d77916ee6542f7 to your computer and use it in GitHub Desktop.
Drupal, Radiokarantin.eu: Check which post reference which media
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT nid, node_field_data.status, type, FROM_UNIXTIME(node_field_data.created) AS Created, title, field_soundcloud_target_id AS mid, name, field_media_oembed_video_value AS Link | |
FROM `node_field_data` | |
LEFT JOIN `node__field_soundcloud` on node_field_data.nid=node__field_soundcloud.entity_id | |
LEFT JOIN `media__field_media_oembed_video` on field_soundcloud_target_id=media__field_media_oembed_video.entity_id | |
LEFT JOIN `media_field_data` on field_soundcloud_target_id=mid | |
WHERE type='article' OR type='episode' | |
ORDER BY nid DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment