How to write a query to get data like this
Branch 1🔴🟢🔴🟢🔴
Branch 2 🔴🔴🟢🟢🟢
Branch 3🔴🟢🔴🟢🔴
Branch 4🔴🔴🟢🟢🟢
.
.
.
.
.
.
Here branch is the actual branch and green represent success build ,red will be the failure build and black will be the aborted build status. (Recent 5 build status)