max

Finding a users maximum score and the associated details

I have a table in which users store scores and other information about said score (for example notes on score, or time taken etc). I want a mysql query that finds each users personal best score and it's associated notes and time etc. What I have tried to use is something like this: SELECT *, MAX(score) FROM table GROUP BY (user) The p...

Getting the last 5 records of a joined query

I have a query that does what i want joining table but i need it to change sligtly so i can use it for something else. I need to get the last 5 records so i should be using the max function and limit it to 5 but it's not working properly This is my current query, just need to get the last 5 records (probably by the festivalid) SELECT...

which is max size of 'max_length' in django .

this is my model: class Position(models.Model): map = models.ForeignKey(Map,primary_key=True) #members=models.CharField(max_length=200) LatLng = models.CharField(max_length=40000) infowindow = models.CharField(max_length=40000) but it can't run .. thanks ...

max count with joins

I have 3 tables: users: Id Login 1 John 2 Bill 3 Jim computers: Id Name 1 Computer1 2 Computer2 3 Computer3 4 Computer4 5 Computer5 sessions: UserId ComputerId Minutes 1 2 47 2 1 32 1 4 15 2 5 5 1 2 7 1 ...

Mono Winforms Mac OS X Replacement for WebBrowser

I'm one step away from having my Windows .Net application working on Mac OS X, and the last thing I need to figure out is the WebBrowser control. I need to display a webpage and not much more with winforms but haven't been able to find any examples or information on how I can replace the WebBrowser control on Mac OS X Has anyone alrea...

WPF unwanted grid splitter behaviour

Hello, I have a simple grid with 3 columns (one of which contains a grid splitter). When resizing the grid and the left column reaches its minimum width, instead of doing nothing it increases the width of the right column. Could anyone help me stop this? I can't set the max width of the right column, because the grid itself also resize...

How can I find the maximum or minimum of a multi-dimensional matrix in MATLAB?

I have a 4D array of measurements in MATLAB. Each dimension represents a different parameter for the measurement. I want to find the maximum and minimum value and the index (i.e. which parameter) of each. What's the best way to do it? I figure I can take the max of the max of the max in each dimension, but that seems like a kludge. ...

django select max field from mysql when column is varchar

Hi, Using Django 1.1, I am trying to select the maximum value from a varchar column (in MySQL.) The data stored in the column looks like: 9001 9002 9017 9624 10104 11823 (In reality, the numbers are much bigger than this.) This worked until the numbers incremented above 10000: Feedback.objects.filter(est__pk=est_id).aggregate(sid...

How to get max row from table

HI I have the following code and a massive problem: WITH CALC1 AS ( SELECT OTQUOT, OTIT01 AS ITEMS, ROUND(OQCQ01 * OVRC01,2) AS COST FROM @[email protected] WHERE OTIT01 <> '' UNION ALL SELECT OTQUOT, OTIT02 AS ITEMS, ROUND(OQCQ02 * OVRC02,2) AS COST FROM @[email protected] WHERE OTIT02 <> '' UNION ALL SELECT OTQUOT, OTIT03 AS ITEMS, ROUND(OQC...

Get the AVG of two SQL Access Queries

Hi, I'm trying to get the AVERAGE from the results of two separate sql queries built in MS Access. The first sql query pulls the largest record: SELECT DISTINCTROW Sheet1.Tx_Date, Sheet1.LName, Sheet1.Patient_Name, Sheet1.MRN, Max(Sheet1.) AS [Max Of FEV1_ACT], Max(Sheet1.FEF_25_75_ACT) AS [Max Of FEF_25_75_ACT] FROM Sheet1 GROUP ...

retrieve the 2 highest item from a list containing 100 000 integers

Hi everyone, How can retrieve the 2 highest item from a list containing 100 000 integers. You do understand without having to sort the entire list. ...

Android: Setting maxSDK version for Android 1.5 app

Hi, I've released an android app with the property <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/> now my app seems to crash on android 1.5 devices (i guess because i use drawable-mdpi/hdpi,...) so thought it would be good to release the same app just for 1.5 devices (not using the mdpi/hdpi-directories). but whe...

Select *, max(date) works in phpMyAdmin but not in my code

OK, my statement executes well in phpMyAdmin, but not how I expect it in my php page. This is my statement: SELECT `egid`, `group_name` , `limit`, MAX( `date` ) FROM employee_groups GROUP BY `egid` ORDER BY `egid` DESC ; This is may table: CREATE TABLE `employee_groups` ( `egid` int(10) unsigned NOT NULL, `date` date NOT NUL...

Good way to get the key of the highest value of a Dictionary in C#

I'm trying to get the key of the maximum value in the Dictionary<string, double> results. This is what I have so far: double max = results.Max(kvp => kvp.Value); return results.Where(kvp => kvp.Value == max).Select(kvp => kvp.Key).First(); However, since this seems a little inefficient, I was wondering whether there was a better way ...

MySQL query puzzle - finding what WOULD have been the most recent date

I've looked all over and haven't yet found an intelligent way to handle this, though I feel sure one is possible: One table of historical data has quarterly information: CREATE TABLE Quarterly ( unique_ID INT UNSIGNED NOT NULL, date_posted DATE NOT NULL, datasource TINYINT UNSIGNED NOT NULL, data FLOAT NOT NULL, PRIMARY KEY (unique_ID)...

How do I find the .max of an attribute value among a group of different Models?

Hi, everyone: I am also open to just straight-up refactoring what I'm finding to be pretty repetitive, but to give a baseline of how it's working.... I have for every contact a Campaign, which has_many of three types of Models: Email, Call, and Letter. When an Email (Call or Letter) has been executed for a specific contact, I have a C...

Limit the length of SharePoint Rich Text Box

Hi All, In My SharePoint site I have a list containing rich text box column. I want to limit the max lenght of text in this textbox but I could not found any property for that. Can anyone help me to achive this ? Thanks in advance Sachin katkar ...

check max characters in textbox

I have textboxes where i only want signed a max number of characters in. an then I'll hear how i could check it easily in c# ...

jquery slider control issue

Hi All, I am using slider control to create a progress bar for media player. Problem: the max value and slider size is not matching. The video get complete before it reaches the end of the slider. Code: <script type="text/javascript" src="js/jquery.ui.core.js"></script> <script type="text/javascript" src="js/jquery.ui.slider....

What is the easiest way to get a key with the highest value from a hash in Perl?

What is the easiest way to get a key with the highest value from a hash in Perl? ...