Warren Buffett once said, "If you aren't willing to own a stock for 10 years, don't even think about owning it for 10 minutes." Buying or selling a stock based on what it may do for your portfolio in the short term isn't a profitable way to invest over the long term. 

However, if you're only buying great businesses with sustainable competitive advantages and plan to hold them for many years -- a key aspect of Buffett's strategy in building Berkshire Hathaway's famed portfolio -- you can root out the weeds and focus your capital on compelling, long-term growth stories.

Let's take a look a two such stocks from the Oracle of Omaha's portfolio that long-term investors may want to buy in the current discounted market. 

1. Amazon 

At the time of this writing, Amazon (AMZN -1.86%) comprises 0.3% of Berkshire's basket of stocks. Investors may have been dismayed by Amazon's recent 2022 earnings report, but a closer look at the company's performance last year puts those numbers in context. 

For example, one of the most eye-catching figures from Amazon's 2022 earnings report was its net loss of $2.7 billion. However, this bottom-line figure -- while wince-worthy indeed -- was almost completely due to the drawback in Amazon's common stock investment in Rivian. Shares of Rivian have been absolutely pummeled by the market, and that was the guiding factor behind Amazon's first annual net loss in nearly a decade. But its partnership with the electric vehicle company remains a key part of the long-term fulfillment strategy for its market-leading e-commerce business. In fact, Amazon intends to have 100,000 Rivian vehicles on the road delivering its packages by 2030.  

While Amazon's revenue was only up 9% and operating income was down year over year in 2022, these still totaled a healthy $514 billion and $12 billion for the 12-month period. This revenue figure represented an increase of 83% from 2019, before the pandemic drove a supercharged period of growth for Amazon. And, Amazon's market-leading cloud segment Amazon Web Services alone generated revenue of $80 billion in 2022, up 30% from 2021.  

In short, when you dig deeper beyond the headlines and into the numbers, Amazon is still growing exponentially from pre-pandemic levels, and even that notable net loss was wholly unrelated to any issues with its underlying business. The company closed out 2022 with about $70 billion in cash and investments on its balance sheet.  

The tech giant has plenty of liquidity on hand to weather any near-term storms plus a market-leading presence on a global scale in industries like cloud infrastructure and e-commerce. These sectors may see a pullback in spending in the near term, but are poised for explosive growth over the next decade and beyond -- creating a particularly compelling buying proposition at Amazon's current beaten-down share price

2. Apple 

Apple (AAPL 0.31%) accounts for 41% of Berkshire Hathaway's portfolio. The tech giant is trading down slightly from its position 12 months ago, but is up by double-digits since the start of 2023. And for investors who have stuck with the stock through the trailing decade, a combination of share price increases and steady dividend returns has enabled a total return of more than 980% in that 10-year period.  

Apple has had to contend with issues like supply chain headwinds due to its heavy concentration of manufacturing infrastructure in China, not to mention a constrained consumer spending environment. But even as investor sentiment has remained in flux toward growth-oriented tech businesses, the long-term view for Apple is still abundant with green flags. Yes, people are spending less money on high-ticket items like smartphones right now. But this is only to be expected when they are contending with high inflation and a drain on their personal savings. 

Still, Apple controls roughly 28% of the global smartphone market.  This space is on a growth trajectory set to reach a valuation of nearly $500 billion by 2026. Even in the current environment where consumers are spending less as a rule, Apple still recorded a major milestone of more than 2 billion active devices installed worldwide as of the most recent quarter.  

And of course, Apple has plenty of other products to rely on for future, prolonged growth -- such as its rapidly growing services segment, which includes everything from Apple Music to Apple TV+. Apart from smartphone sales, Apple's services segment now accounts for the second-largest portion of its sales. In the most recent quarter, these two segments alone brought in combined sales of $87 billion.  

To put those figures in context, Apple recorded total net sales of $117 billion for the three-month period, along with net income of $30 billion. The tech behemoth generated $34 billion in operating cash flow in the quarter, having returned $25 billion in dividends to shareholders just in that single period. This is anything but the tale of a business with its glory days long behind it.

From the continued growth trajectory of its key operating segments to the explosive opportunity in its more nascent sales streams like advertising -- a business that Apple thinks could balloon to $10 billion in revenue in the near future -- there is plenty of runway left for this business.