Query inmemory dataset

I have created an inmemory dataset with a few columns and several rows. I now want to query the dataset to get a result which is a count of similar text items such as select count(names) from dataset group by names. How can I query an in-memory dataset to get this result?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I suppose it is a ClientDataSet, so you can:

ClientDataSet.filtered := true;
ClientDataSet.filter := 'fieldname = 'value''; {here you filter what you want}
ClientDataSet.filtered := true;
x := ClientDataSet.recordcount; {here you check how many fields you get}
stonemeadowAuthor Commented:
I am familiar with filtering but want to query the dataset as if it were a Table.
Geert GOracle dbaCommented:
how did you create your data
are using a TStringList, TClientDataset, etc ?

what do you understand under query data ?
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

stonemeadowAuthor Commented:
The dataset is a TTable without a database backend. All fields are created using the FieldDef's property. You can create fields of float, string  etc. and populate the table using insert, append etc. as if it were a database table. After the data is populated, it would be nice to 'query' the table using sql commands. That is what I am looking to do.
Geert GOracle dbaCommented:
doesn't work unless you use a 'embedded' database

you will allways need a engine to interpret the 'query'
otherwise you'll have to write your own engine to do that

you could use absolute database for a single file db
or an extreme in memory db:
or local files, like SQLite

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stonemeadowAuthor Commented:
Solution makes sense. I appreciate the reference to these products.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.