&
Best unofficial Apache Server developers community
Username
Remember me?
Password
Forgot password?
Create an account
List archives
Videos
Answers
Questions
Unanswered
Tags
Ask Question
distinct
0
votes
1
answer
29
views
Count(distinct) and group by issue
I am joining two tables (shipments and returns) and using group by to view totals for certain criteria. The two tables are related via shipment_id.…
mysql
count
group-by
distinct
group
asked
June 23, 2011 1:20 am CDT
JoshG
1
vote
2
answers
25
views
Mysl random query but with distinct values from 1 column
I've a query like SELECT Id, Category, Title FROM articles WHERE 1 ORDER BY RAND() LIMIT 0,20 I've 20 categories and I want 1 random article per…
mysql
query
random
duplicates
distinct
asked
June 22, 2011 3:01 am CDT
Diego
0
votes
2
answers
27
views
Select distinc first row from database
number | time 421112233444 | 1304010250 421112233444 | 1304272979 421001122333 | 1303563263 421112233444 | 1300217115 421001122333 | 1303649310 i…
postgresql
distinct
asked
June 20, 2011 9:26 am CDT
jan
0
votes
4
answers
23
views
SQL and distinct
I'm having trouble on generating a report in MySQL. I have this table: id date (yyyy-mm-dd) title I need to generate a report that throws how many…
mysql
sql
distinct
asked
June 16, 2011 10:37 pm CDT
andufo
0
votes
2
answers
38
views
Retrieving DISTINCT values from 2 columns in same table as one ordered list
I would like to take two columns of data in the same table, and return the unique records from both in an ordered list. I tried this: SELECT…
php
mysql
distinct
asked
June 15, 2011 2:46 pm CDT
mootymoots
3
votes
4
answers
34
views
MySQL SELECT DISTINCT with tolerance of variation
in my database I have a lot of entries that are very similar but not identical. For instance just two characters might be different such as: Row1:…
mysql
distinct
asked
June 14, 2011 8:43 am CDT
David
3
votes
2
answers
31
views
Find distinct values of a varchar column in an super-large MYSQL table
I want to find the distinct values of a varchar column in a super large MYSQL table(1 billion rows). I have the follow solution: 1. select…
mysql
sorting
unique
distinct
asked
June 10, 2011 6:50 pm CDT
user775187
0
votes
5
answers
26
views
MySQL Select Distinct Question
I want to return all columns from a table, but only for the 'unique' or 'distinct' users. I want to grab all the distinct users from a table, but…
mysql
sql
select
distinct
greatest-n-per-group
asked
June 8, 2011 8:55 am CDT
Sam Grant
0
votes
1
answer
39
views
Sqlalchemy with postgres. Try to get 'DISTINCT ON' instead of 'DISTINCT'
I need to generate query like this: SELECT DISTINCT ON (article.code) article.code, article.title First I try to make it via ORM distinct method and…
postgresql
sqlalchemy
distinct
asked
May 30, 2011 6:24 am CDT
exabiche
0
votes
1
answer
48
views
How to optimize a "select distinct" across three tables, 40k rows, that only returns 22 results.
So I have this query, which pulls some features/materials for an item(shoes, generally). There are a lot of products, and thus a whole lot of…
mysql
sql
query-optimization
distinct
asked
May 27, 2011 2:15 pm CDT
Tchalvak
0
votes
1
answers
66
views
Get distinct record from table using zend functions ?
I am getting all records like this in Zend: $table = new Model_Student_Object(); $select = $table->select(); echo $select->assemble();die();…
mysql
query
zend-framework
distinct
asked
May 24, 2011 7:19 am CDT
Student
2
votes
5
answers
23
views
How to get distinct record from mysql table ?
I have a table student like this id | name | zip 1 | abc | 1234 2 | xyz | 4321 3 | asd | 1234 I want to get all records but zip code should not be…
mysql
distinct
asked
May 24, 2011 6:35 am CDT
Student
1
vote
2
answers
30
views
MySQL distinct and left, right
Hi, I have a table with day column like this: 2011-04-28, 2011-04-29 ... day count name surname 2011-04-28 8 titi tutu 2011-04-28 12 tutu toto…
mysql
sql
distinct
left
right
asked
April 29, 2011 12:05 pm CDT
scraly
0
votes
2
answers
28
views
SQL DISTINCT when combining LEFT JOIN with subquery
Hi, I have the following two SQL tables for storing movie titles, and the dates I've seen them: CREATE TABLE movies ( id int(10) unsigned NOT NULL…
mysql
subquery
left-join
distinct
asked
April 28, 2011 8:37 am CDT
EspenA
0
votes
2
answers
34
views
Distinct MySQL Results
Hello, I have the following SQL query: SELECT c.comid, d.deid FROM dating_events d JOIN companions c ON d.userid = c.userid WHERE c.userid = 5 Which…
mysql
distinct
asked
April 27, 2011 4:01 pm CDT
Zubair1
1
vote
2
answers
34
views
Removing duplicates from result of multiple join on tables with different columns in MySQL
Hello, I am trying to make one statement to pull data from 3 related tables (as in they all share a common string index). I am having trouble…
mysql
join
distinct
combinations
product
asked
April 23, 2011 8:34 pm CDT
Alfred
1
vote
2
answers
51
views
MySQL DISTINCT won't work when certain columns are SELECTed
I got a mysterious behaviour using DISTINCT on a MySQL table and can't figure it out: SELECT DISTINCT `deal_hash`,`city_name` FROM `a` WHERE…
mysql
sql
distinct
asked
April 9, 2011 7:24 pm CDT
kritop
0
votes
2
answers
32
views
Mysql distinct or unique: remove rows with same column value
I'm querying a bunch of cities from a zip-code table. I'd only like to grab results with an unique 'City'. (Lots of cities have multiple zips.) How…
php
mysql
query
unique
distinct
asked
April 8, 2011 12:28 am CDT
Jeffrey
1
vote
3
answers
39
views
MySQL: Get Last Distinct Set of Records
I have a database table containing the following columns: id code value datetime timestamp. In this table the only unique values reside in id i.e.…
mysql
distinct
asked
April 5, 2011 10:05 am CDT
Chuck Ugwuh
1
vote
3
answers
42
views
Counting overlapping bitwise columns in mysql
I have a table in which there is a bitwise column representing a list of statuses that can be attached to an entry. Each entry can have multiple…
mysql
group-by
distinct
bitwise
asked
April 5, 2011 5:58 am CDT
FuzzyDunlop
Pages
:
1
|
2
|
3
>
53
distinct
Tagged:
distinct
Related Tags
mysql
× 42
sql
× 17
query
× 10
php
× 9
group-by
× 7
sqlite
× 7
count
× 6
unique
× 5
join
× 3
select
× 3
postgresql
× 3
duplicates
× 3
subquery
× 2
sum
× 2
android
× 2
sqlalchemy
× 1
timestamp
× 1
zend-framework
× 1
left
× 1
sorting
× 1
create
× 1
bitwise
× 1
arrays
× 1
tsql
× 1
graph
× 1
distinct-values
× 1
group
× 1
text
× 1
order-by
× 1
English
Russian
Copyright 2007 - 2012
Best unofficial Apache Server developers community
Privacy policy