Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8450589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:00:36+00:00 2026-06-10T11:00:36+00:00

Using NSFetchedResultsController and NSFetchRequest is it possible to setup a query that returns the

  • 0

Using NSFetchedResultsController and NSFetchRequest is it possible to setup a query that returns the highest value in each attribute.

For example:

Entity_001 A=F B=27 C=57
Entity_002 A=G B=23 C=98
Entity_003 A=X B=21 C=54
Entity_004 A=K B=11 C=27
Entity_005 A=R B=16 C=15

Result:

Entity_003 A=X B=21 C=54 // Biggest A
Entity_001 A=F B=27 C=57 // Biggest B
Entity_002 A=G B=23 C=98 // Biggest C

Essentially I have one data set and I need to pick out “the smallest”, “the fastest” and “the heaviest” I could do it manually without using NSFetchedResultsController, or I guess I could use 3 NSFetchedResultsControllers and try and mesh the results back into a single data source. Any ideas would be very much appreciated …

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:00:37+00:00Added an answer on June 10, 2026 at 11:00 am

    I would do 3 different fetch requests to return the highest value for each particular request, and then merge the object IDs of each particular fetch request result into an array, and perform the NSFetchedResultsController fetch (to have notifications from changes) with a fetch request that looks for the IDs of the objects inside the array. Basically, it’s 4 fetches. Three can be done in the background, one for the NSFetchedResultsController instance which will be done in the main thread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have setup a UITableView using a NSFetchedResultsController that displays a number of prototype
I'm using a core data, NSFetchedResultsController UITableView, with a transient NSDate attribute. The main
I'm using NSFetchedResultsController pretty much out-of-box in the way that the documentation describes. Here
Example I have NSFetchedResultsController called at ListController called FetchController +(NSFetchRequest * )fetchRequestInContext: (NSString*) entityName
I am using UIDocument to access core data and trying to setup NSFetchedResultsController in
I am using a NSFetchedResultsController in combination with a UIManagedDocument which gets updated in
I am using an NSFetchedResultsController to manage displaying fetched managed objects in a table
Using import datetime in python, is it possible to take a formatted time/date string
I want to refetch data from my NSFetchedResultsController using a different predicate which is
I'm using NSFetchedResultsController for my table view. I call -performFetch inside my controller's -viewDidLoad

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.