Famous investor Warren Buffett loves putting his money into things that interest the U.S. consumer. His holding company, Berkshire Hathaway, has a massive portfolio littered with consumer-focused and financial stocks like Coca-Cola, Apple, and Bank of America.

However, not all of Berkshire's holdings have direct ties to consumers. Outside its usual playbook, Berkshire owns a $1.2 billion stake in data cloud company Snowflake (SNOW -1.85%). Despite trading down 50% from its high, the stock could someday become one of Berkshire's best-performing investments. Investors should consider buying and holding this Buffett stock for years to come.

Why? Well, part of the reason is that Snowflake is expected to play a vital role in artificial intelligence (AI) and stands to benefit greatly from its growth over the coming decades.

Snowflake solves an important problem in AI

You've probably heard a lot about AI over the past year. You may have even dabbled with OpenAI's AI-powered chatbot ChatGPT. But have you ever thought about looking under the hood at what makes AI models work? The power behind an effective AI involves having huge amounts of data to train its models.

Data brings AI alive. But data is complex. It's hard to acquire for many organizations. Those with it often don't know how to organize, secure, or sift through it for what they need. Snowflake, a data cloud platform, helps solve this.

Organizations can upload their data to Snowflake, which is securely stored in the cloud. Users can search and analyze the data as needed. If the data is messy, Snowflake integrates with various third-party applications to modify or clean up the data as required. Additionally, users can share or purchase third-party data within Snowflake's marketplace.

Simply put, Snowflake can help companies build the data they need, secure and store it, and help them use it.

Snowflake's growth opportunities are virtually endless

For investors, data looks like a huge long-term opportunity. Why? Because data is growing exponentially. It's estimated that approximately 90% of all the world's data was created in the past two years alone.

I mean, think about it. The world is becoming increasingly digital, creating more data faster. The population is growing and migrating online. Data also doesn't expire. Data from years past will remain important as long as it's used. So, old data isn't replaced; more data is created and stacked on top of it.

It's almost mind-bending to ponder how much data there will be five, 10, or 25 years from now.

That's why it's arguably genius that Snowflake charges its customers on a usage-based billing model. Customers can increase or throttle their storage and computing needs on Snowflake to control how much they spend.

That control could appeal to customers, but ultimately, the long-term growth of data points to them spending more on the platform. Snowflake's net revenue retention (NRR) is an impressive 135%. That's 35% revenue growth without factoring in any new customers.

And at just over 8,900 customers, there is a lot of room for customer growth. There are over 300 million businesses worldwide, and Snowflake can potentially grow for decades if it captures even 500,000 of them over time.

Snowflake's strong financials should only get better

A great business needs to make money to be an excellent investment. Fortunately, Snowflake is sitting pretty. The company is doing over $2.6 billion in annual revenue, turning 24% of that into free cash flow. That's cash to invest in growth, make acquisitions, or repurchase shares.

SNOW Revenue (TTM) Chart

SNOW Revenue (TTM) data by YCharts

Analysts are optimistic about earnings growth, looking for an average of 61% annual growth over the long term. Admittedly, that makes Snowflake an expensive stock today, considering its forward P/E is a whopping 255 and its PEG ratio is over 4. Clearly, the company's remarkable growth potential isn't lost on Wall Street.

I wouldn't blame anyone for avoiding the stock at this price because you must hope everything goes right for the company when you pay that much. Still, Snowflake could prove to be an exceptional business. Having a long time horizon to hold the stock gives it more time to grow into its valuation. Additionally, investors should consider a dollar-cost-averaging strategy, where you buy shares a little at a time. That gives you skin in the game if the stock remains expensive but leaves room to buy more if the stock eventually falls to more attractive prices.