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...
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...
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
...
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 ...
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...
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...
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.
...
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...
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...
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 ...
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.
...
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...
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...
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 ...
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)...
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...
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
...
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#
...
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?
...