Take the top 3 as an example, Google, Yahoo and MSN. They all take their initial data from databases so a good understanding of SQL is needed including subquerys, joins and filters etc. Most of the SERPS though, are determined at application level, so you'll need to sort them in some sort of relevant order in the script or compiled code. You have to decide why website x should be listed above website y. Mostly, a list of criteria is tested for then sites scored against it. All I can say is, good luck!
What platform/languages are you using for this?