pull-icon
logo-mobile

Rotation - SQL Query - 30d / 10h / 5h

Home/Forums/Rotation - SQL Query - 30d / 10h / 5h

Bronze Member
Bronze Member

SCS-BOT

last month

This rotation was automatically generated using the StreamCode Studio Rotation Builder.

Below is a detailed summary of the settings that were applied during the build process.
These values are for an artist not played for a minimum of 30 days, Not repeating Artist for 10 hours with a 5 hour rotation.

Rotation Settings Used:
Output type: SQL Query
- Days since last play: 30
- Artist separation: 10 hours
- Target duration: 5 hours


SELECT *
FROM songs
WHERE enabled = 1
  AND (date_played IS NULL OR date_played < NOW() - INTERVAL 30 DAY)
  AND artist NOT IN (
        SELECT artist
        FROM history
        WHERE date_played > NOW() - INTERVAL 10 HOUR
  )
ORDER BY (weight + 1) * RAND() DESC
LIMIT 1;
If you have any suggestions, improvements, or want to share your own version, feel free to comment below.
You can also regenerate or tweak this rotation any time using the StreamCode Studio Rotation Helper Tool.

Leave a Comment

You must be logged in to post a reply.

Thank you ??

Thanks for supporting this station!

We've sent a download link to your email {}
Please check your inbox (and spam folder just in case).
The link will be valid for 24 hours.



BellOnline offers fast, reliable UK hosting with strong security and excellent uptime - perfect for modern radio and web projects.
MixStream provides broadcast-grade streaming with crystal-clear audio and rock-solid stability, ideal for both hobby and professional stations.

Goto BellOnline Now!

Close