Direct revenue comparison between Wal-mart and Amazon makes no sense. Amazon revenues are a lot more diversified than Walmart.
Portions like AWS, Digital and 3P/FBA service revenues will have much higher margins than first party retail revenues (which is the most like Wal-mart revenues, except the margins are completely different due to no having brick-and-mortar stores.). Additionally, Amazon is a lot more international than Wal-mart so comparison is even harder.
All of this completely ignore the growth rates of these two companies.