What happened

Walgreens Boots Alliance (WBA 0.65%) had a lousy day on an generally prosperous Wednesday for stocks. On the back of a big rival's earnings release, the company's shares fell by more than 2%. By contrast, the S&P 500 index rose by 1.5% during the trading session.

So what

The rival in question is Rite Aid, which unveiled its third quarter of fiscal 2023 results before market open.

While the company notched modest beats on both the top and bottom lines, it lowered its non-GAAP (adjusted) earnings before taxes, depreciation, and amortization (EBITDA) guidance for the entirety of the fiscal year. Also, Rite Aid's net loss forecast for the period will likely end up being steeper than current analyst expectations.

Walgreens isn't Rite Aid, of course, but as retail pharmacy incumbents, the pair both swim in the same waters. So Walgreens investors were looking at those Rite Aid numbers and getting nervous. Yes, the latter company beat outside estimates, but that was somewhat of a hollow victory, given that revenue slid on a year-over-year basis, and the net loss deepened. The latest guidance didn't help, either.

Now what

Meanwhile, Walgreens' next set of quarterly earnings is barreling toward us like Santa's accelerating sled. The company is set to publish its first quarter of fiscal 2023 results barely over two weeks from now, on Thursday, Jan. 5.

Expectations for the period aren't high. On average, analysts tracking the stock are anticipating erosion on both the top and bottom lines -- revenue is expected to drop to under $32.8 billion from the nearly $34 billion of first quarter 2022, while per-share earnings are assumed at $1.13 against the year-ago figure of $1.68.