Question: I have some statistics I need to report on a monthly basis. I need my query to return 0's for statistics which aren't there. The only way I know to do this is to use SQL to generate a list of days within the specified time period and `LEFT JOIN` the statistic data that I need to report on.

Problem is.... I've never not selected from a table like that... how do I do that?

Answer: 
Just 1 integer?

```
// write
[[NSUserDefaults standardUserDefaults] setInteger:theInteger forKey:@"bestScore"];

...

// read
theInteger = [[NSUserDefaults standardUserDefaults] integerForKey:@"bestScore"];

```

(Usually games support top-10, and you'd want to box the NSInteger into an NSNumber, insert all 10 of them into an NSArray, and save the array.)
Yes, use NSInteger and store it in your preferences or a private file.

Store in user defaults with:
 [[NSUserDefaults standardUserDefaults] setObject:[NSArchiver archivedDataWithRootObject:highScore] forKey:@"HighScore"];

Retrieve With:

```
NSNumber * highScore = [defaults objectForKey:@"HighScore"];    

```