Last quarter, Walmart (WMT -0.38%) delighted investors with its strongest sales performance in years. CEO Doug McMillon highlighted some key drivers of the retail giant's success in his commentary accompanying its strong second-quarter earnings report. Read on to see why McMillon believes Walmart is positioned for continued success in the coming years. 

Walmart is enjoying broad-based growth

The Walmart U.S. business delivered the best quarterly comp sales results in more than a decade, up 4.5%, excluding fuel. Walmart U.S. e-commerce sales accelerated to 40% growth. Sam's Club comp sales were up 6.5%, excluding fuel and a 150 basis point negative impact from tobacco. International had a good quarter with positive comp sales in our four largest markets -- Mexico, U.K., Canada, and China, including a more than 5% comp increase at Walmex.
-- CEO Doug McMillon

Walmart's 40% domestic e-commerce growth certainly grabbed headlines, but the strong performance of its stores should not be overlooked. Traffic increased 2% at Walmart's U.S. stores in the second quarter, which helped drive a solid 4.5% rise in comparable store sales. Positive membership trends at Sam's Club and strong comps in key international markets, such as Mexico, were other significant growth drivers. In all, total revenue rose 3.6% in constant currency, to a staggering $127.8 billion.

A compass pointing towards the word "growth."

Walmart dialed up its strongest sales growth in years in the second quarter. Image source: Getty Images.

A strong U.S. economy is boosting results

We're really proud of the team and appreciate the hard work they put into the quarter, but we also acknowledge that we benefited from a favorable economic environment and weather. Customers tell us that they feel better about the current health of the U.S. economy as well as their personal finances. They're more confident about their employment opportunities.
-- McMillon

Low unemployment and sluggish but persistent wage growth are boosting consumer confidence. This, in turn, is having a direct and significantly positive impact on Walmart's sales.

Walmart is often thought of as a countercyclical business: one that benefits when consumers trade down from more expensive stores during difficult economic times. While that's true to some extent, Walmart's second-quarter results show that the company is also a prime beneficiary of a strong U.S. economy.

Strategic alliances and acquisitions are driving international growth

In China, we saw solid comp sales growth of 1.5% as the team continues to do a nice job of strengthening our offerings in key categories like fresh and private brands. We're also deepening our strategic relationships with Tencent by expanding the WeChat app features like Scan & Go to improve the customer experience in stores. With our growing omnichannel capabilities in China, we further expanded to reach about 200 Walmart stores that offer grocery delivery in less than one hour through the Dada-JD Daojia delivery platform. And during the quarter, we also launched this popular one-hour delivery service to the Sam's Club business. In fact, Walmart ranked first on the JD Daojia app in terms of total sales in June.
-- McMillon

Walmart wisely abandoned its futile strategy of competing directly with Chinese e-commerce titan Alibaba back in 2016 and instead began building a stake in rising Chinese e-commerce star JD.com (JD 0.81%). In addition, Walmart partnered with Chinese tech titan Tencent (TCEHY 1.73%), which also owns a large stake in JD.com. The three companies now assist each other with order fulfillment and delivery, and they enjoy streamlined order and payment processing via Tencent's popular WeChat app.

Moreover, Walmart's stake in JD.com gives it a way to profit from the rapid growth of online shopping in the world's most populous nation, without the need to incur the massive expense of building out its own fulfillment network. The better path is to align itself with those most likely to win in this immense market -- and Walmart has done just that.

When combined with its recent $16 billion purchase of a controlling stake in Indian e-commerce pioneer Flipkart, these aggressive moves have positioned Walmart to win in two of the world's largest and fastest-growing markets in the years ahead.