I may not have explained my initial requirement too well. The original snippet outputs all the colouways that are marked as Ordered. One buyer could have multiple orders. I would like to limit the output to only show a single buyer with however many orders they have so the initial input would need to be which buyer.
Thanks for clarifying the requirement. You can introduce an input in the note section for the buyer using SELECT DISTINCT, then use it as an input to the other query as follows:
{note}{dbselect: SELECT DISTINCT Buyer FROM Colourways WHERE orders=yes; space=02HdgZGm0jNamFkoQbvhd3; menu=yes}{dbselect: SELECT Colourway, BookPage, Orders, Buyer FROM Colourways WHERE Orders = yes AND buyer=@buyer ORDER BY Buyer ASC LIMIT 900; space=02HdgZGm0jNamFkoQbvhd3; multiple=yes; menu=no; name=colours}{endnote}
Colourway Book-Page Buyer
{repeat: for row in colours} {=row.colourway} {=row.bookpage} {=row.buyer}
{endrepeat}