Amazon Inc.'s (AMZN) - Get Report influence over the U.S. grocery market was abundantly clear in this week's spate of quarterly retail earnings, with the big winners coming from those that are increasingly e-commerce driven and the laggards are having issues on the digital front.

Online grocery sales in the U.S. are projected to increase about 26% this year, according to data aggregated by Statista, and could grow by nearly 40% by 2021. Nielsen's 2018 "Connected Commerce Report" noted that more than 25% of global digital consumers have  purchased fresh groceries online, a figure that's nearly 4 percentage points higher over the previous two years.

Amazon's $13.7 billion purchase of Whole Foods in the summer of 2017, adding brick-and-mortar to its prime grocery store and delivery business, has not only taken the retail giant into the heart of the food sales business, but also added immense pressure on rivals to hone their e-commerce offerings and increase their online footprints in order to win market share.

And it was the e-commerce focused players that have posted the strong quarterly earnings, and 2019 guidance, over the recent reporting period, driving gains for both grocery-focused stocks and the S&P 500 consumer staples index.  

Costco

Costco Wholesale  (COST) - Get Report was the latest in the group to report quarterly earnings late Thursday, with the Issaquah, Washington-based retailer reporting a 25.5% surge in e-commerce sales over the three months ending on February 17. 

Much of Costco's online sales strength comes from its loyalty rewards program, and its membership fees revenue grew 7.2% year-over-year. Going forward, CFO Rich Galanti mentioned on the earnings call the company will expand e-commerce operations in Japan and Australia in the second half of 2019.

Costco also reported second quarter earnings per share of $2.01, easily beating Wall Street's expectations of $1.69. total revenue came in at $35.4 billion, missing analysts estimates of $35.65 billion. Comparable sales growth was 6.7%, Costco said.

Costco shares topped the S&P 500 Friday with a 5.1% gain, the best in two years, to $227.70 each, a move that extends its year-to-date gain past 11.8%, well ahead of the S&P 500 Consumer Staples benchmark and the broader S&P 500. 

Related.Costco shares just surged into a technical ceiling

Walmart 

Walmart (WMT) - Get Report reported fourth quarter earnings in late February, and it too impressed investors with its online push.

Walmart said digital sales grew 43% from last year, almost doubling sales in the digital channel over the past two years, as it continues to define itself as a leader in online grocery sales. A Deutsche Bank note out in October mentioned Walmart wants to end the 2019 with 2,100 locations with pick-up capabilities, up from the current 1,800. Most e-commerce activity in groceries is done through app purchases, which the customer can either pickup from a location or receive a delivery.

Earnings per share for the fourth quarter came in at $1.41, beating estimates of $1.33. Total revenue was $138.8 billion, just missing Wall Street's expectations of $139.3 billion. Comparable sales grew 4.2%.

After hovering around $95 a share for the beginning of 2019, the stock moved up to $102.20 on February 19 after the earnings print, just shy of its all-time high of $104 hit in February of 2018. The stock has settled at $97, where it was trading Friday. It's up just over 4% this year. 

Kroger (KR) - Get Report and BJ's Wholesale Club (BJ) - Get Report have told a different story. 

Kroger

While Kroger did see 58% growth in e-commerce sales, that still wasn't enough to see total revenue through to positive growth. Some on Wall Street are unsure of the grocer's ability to compete with its heavy hitting peers.

"Fiscal 2018 showed that while spending on omni-channel and digital growth strategies are very significant, the benefits haven't been nearly as obvious so far," a note out from Pivotal Research Friday said. Morgan Stanley analysts said online sales growth could stall in the near future. "Upside risks include continued share gains from other conventional operators, online grocery penetration stagnating, increased scale," the analysts said. As for scale, Kroger's cash pile is $411 million, compared to Walmart's $7.7 billion. 

Kroger missed earnings estimates, posting EPS of 48 cents, lower than Wall Street's expected 52 cents. The earnings result was an 11% year-over-year decrease. Total revenue was $28.1 billion, down 11% year-over-year. Management guided for EPS in the full year of 2019 of between $2.15 to $2.25, below analysts hopes for $2.26.

The stock is down 12% since the closing bell Wednesday. It was trading at $24.88 a share Friday morning. While some may think it might be time to go back in on the stock, Jeff Marks, Senior Portfolio Analyst for Jim Cramer's Action Alerts Plus said "Walmart is doing too much disruption in the industry."

BJ's

BJ's doesn't report e-commerce sales numbers, but the grocer posted guidance that dissuaded investors. And with no mention of e-commerce sales on its earnings call, one has to wonder. 

While BJ's beat earnings expectations, the stock fell a bit. Earnings per share came in at 44 cents, beating estimates of 36 cents. Revenue was $3.42 billion, falling 3.9% year-over-year. Comparable sales, however, rose 2.8%. 

Management's guidance was weak. BJ's guided for EPS for full year 2019 of between $1.42 to $1.50 on revenue of between $12.9 billion and $13.2 billion. Analysts were looking for EPS of $1.47 on revenue of $13.3 billion. 

The stock is down about 9.5% from the open on March 6, the day of its earnings report, to $24.82 a share Friday morning. 

A Special Invitation:Do you want to learn more about planning for and living retirement from the nation's top experts, including Ed Slott and Robert Powell, the editor of TheStreet's Retirement Daily? Want to learn how to create tax-efficient income in retirement and how to manage and mitigate all the risks you'll face in retirement? Then sign up to attend TheStreet's Retirement Strategies Symposium on April 6 in New York City. For a limited time, you can attend this extraordinary symposium for $149 - a cost savings of $50 off the general admission price of $199.

You can see the full day's agenda, learn about the guest speakers and sign up HERE for this special event.