This should be in the database:
There was a piper had a coo,
And he'd no hay to gie her.
He took his pipes and played a tune,
Consider, auld coo, consider.
The coo considered verra weel,
For she gave the piper a penny,
That he might play the tune again
Of Corn Rigs are Bonny.
This is in Nicht at Eenie (1932), 15; Nora & Wm Montgomerie Scottish Nursery Rhymes (1946), 87; Gregor, Notes on the Folk-lore of the North-East of Scotland (1881), 133; and Opie, Ox. Dict. of Nursery Rhymes, 351 (no. 416), and the recent 2nd edition, 416, with a longer note. I do not know a tune, but conceivably it's the one names in the last line.