Though I read the books, there were clues on who did the deed throughout the episode; I am curious to see how many people picked it up
I watched it with my dad, who hasn't read the books. He was speculating and came up with four suspects.
Tyrion, because reasons.
Sansa, obviously, when she picked up the cup for Tyrion could have slipped something into it.
Pycelle, who was sent down to the kitchens and could have put something in the pie as revenge for how Cesei treated him.
Margaery, to get him out of the way.
Now having read the books I didn't want to tell him, and even if I did the shows producers have changed so much that I may not even be right. We heard in the books (and yes, it was clearly stated, but by a known liar!) one thing, but they might have something different in mind. I did see Lady Olenna play with Sansa's hair, though!