Related
Ilan Kleiman I have this MySQL query but can't seem to solve it. I want it to group the "symbols" in the table "portfolio". ( SELECT symbol FROM portfolio GROUP BY symbol) though, I would like it to limit its search to: ( WHERE key = '$key' AND hash = '$hash'
Orange 555 Weird wording " Notdoesn't work!" I know, but the strange thing is that the returned results do exist user_iddespite the query pointing to NOT (user_id = 1). SELECT post_id, last_update
FROM the_table
WHERE last_update
BETWEEN N
Joseph My query is not grouping correctly and returning wrong results, I can't figure out what the problem is. The query is as follows. FYI - the current form is unclear, the reason I need group by is because I removed all other parts of the query to find the
thin tube I am using the following query to query an Access table: SELECT (VIN&' '&Make&' '&Model&' '&CarYear&' '&ExColor&' '&InColor&' ')as CarDescript
FROM TestTable
WHERE (WorkOrderNumber='$workorder')
GROUP BY AssignedEmp;
But simi
Joseph My query is not grouping correctly and returning wrong results, I can't figure out what the problem is. The query is as follows. FYI - the current form is unclear, the reason I need group by is because I removed all other parts of the query to find the
European users I have this query: SELECT *
FROM (
SELECT p.id, product, unique_name, price, old_price, category_id, added_date
FROM products p, products_to_categories ptc, products_to_adverts pta
WHERE p.id=ptc.product_id AND (expire_date > now
European users I have this query: SELECT *
FROM (
SELECT p.id, product, unique_name, price, old_price, category_id, added_date
FROM products p, products_to_categories ptc, products_to_adverts pta
WHERE p.id=ptc.product_id AND (expire_date > now
Dmitry I have table orders, networks and users, I need to get the total number of orders and the total number of orders for each user, while the users are in the same network, each user has to count. SQLFiddle with sample data: http://sqlfiddle.com/#!9/dcbeea/
Rajan Benipuri I'm running a very simple SELECT query in MySQL and it doesn't work. SELECT string_name FROM table_name;
This gives me the desired output. like This is string one. This is string two. This is string three. etc... but if I run a query like this
Rajan Benipuri I'm running a very simple SELECT query in MySQL and it doesn't work. SELECT string_name FROM table_name;
This gives me the desired output. like This is string one. This is string two. This is string three. etc... but if I run a query like this
Nicoletta Sotiri I'm new to SQL so I don't understand why this query doesn't work. Thank you in advance CREATE VIEW temp AS
SELECT return_date_time, renting_date_time
FROM renting;
CREATE TRIGGER charge_calc AFTER UPDATE ON renting.return_date_time
FOR EACH R
username Why does the following query not work in SQL Server 2008? SELECT
CONVERT(INT, TEMP.observ_value) AS value
FROM
(SELECT observ_value
FROM LAB_RESULTS
WHERE observ_value NOT LIKE '%[^0-9]%') TEMP
WHERE
observ_value >= 190
Her
username Why does the following query not work in SQL Server 2008? SELECT
CONVERT(INT, TEMP.observ_value) AS value
FROM
(SELECT observ_value
FROM LAB_RESULTS
WHERE observ_value NOT LIKE '%[^0-9]%') TEMP
WHERE
observ_value >= 190
Her
Hassan Hassan The query I wrote is not working my query: SELECT *
FROM admin_marker
WHERE admin_marker.city NOT IN (SELECT target FROM messsage)
it says # 1267 - Illegal mix of collations (utf8_general_ci, IMPLICIT) and (utf8_unicode_ci, IMPLICIT) for opera
Hassan Hassan The query I wrote is not working my query: SELECT *
FROM admin_marker
WHERE admin_marker.city NOT IN (SELECT target FROM messsage)
it says # 1267 - Illegal mix of collations (utf8_general_ci, IMPLICIT) and (utf8_unicode_ci, IMPLICIT) for opera
Martin There is code for ajax in a separate sript including, $connection = mysqli_connect($db_config['server'],$db_config['db_user'],$db_config['db_pass']);
if (!$connection)
die('Could not connect to database: ' . mysql_error());
mysqli_select_db($conn
Martin There is code for ajax in a separate sript including, $connection = mysqli_connect($db_config['server'],$db_config['db_user'],$db_config['db_pass']);
if (!$connection)
die('Could not connect to database: ' . mysql_error());
mysqli_select_db($conn
Hassan Hassan The query I wrote is not working my query: SELECT *
FROM admin_marker
WHERE admin_marker.city NOT IN (SELECT target FROM messsage)
it says # 1267 - Illegal mix of collations (utf8_general_ci, IMPLICIT) and (utf8_unicode_ci, IMPLICIT) for opera
Martin There is code for ajax in a separate sript including, $connection = mysqli_connect($db_config['server'],$db_config['db_user'],$db_config['db_pass']);
if (!$connection)
die('Could not connect to database: ' . mysql_error());
mysqli_select_db($conn
Warren Melloni So I use a query function to count the number of instances where a particular name appears in column A of another sheet and display the result in column B of this sheet and the corresponding name in column A. Here is the function: =ArrayFormula(
Zeeshan Nisar I am new to Laravel. I have a database table named A with column names 1,2,3 . In column 3 I have different values like a,b,c. Now what I want is to print out the total value of a, b and c using the group by clause. Sorry, my English is no good.
Warren Melloni So I use a query function to count the number of instances where a specific name appears in column A of another sheet and display the result in column B of this sheet and the corresponding name in column A. Here is the function: =ArrayFormula(QU
Warren Melloni So I use a query function to count the number of instances where a specific name appears in column A of another sheet and display the result in column B of this sheet and the corresponding name in column A. Here is the function: =ArrayFormula(QU
Warren Melloni So I use a query function to count the number of instances where a specific name appears in column A of another sheet and display the result in column B of this sheet and the corresponding name in column A. Here is the function: =ArrayFormula(QU
shamveel_ahammed I am new to SQL. Can anyone help me find out why the "Group By" expression is not working in this sql query? i get this error ERROR at line 3:
ORA-00979: not a GROUP BY expression
The code I am using is CREATE OR REPLACE VIEW CUSTOMER_LINE_IT
username SELECT time.EmpID, time.Date,
SUM(MinutesatState) AS active FROM time WHERE State = 'active'
GROUP BY time.EmpID, time.Date;
The above query works SELECT time.EmpID, time.Date,
SUM(MinutesatState) AS idle FROM time WHERE State = 'idle'
GROUP BY time.
username SELECT time.EmpID, time.Date,
SUM(MinutesatState) AS active FROM time WHERE State = 'active'
GROUP BY time.EmpID, time.Date;
The above query works SELECT time.EmpID, time.Date,
SUM(MinutesatState) AS idle FROM time WHERE State = 'idle'
GROUP BY time.
John Alexander I have a table tablewith the following data: +----------+------+----------+
| location | sold | scrapped |
+----------+------+----------+
| Paris | 5 | NULL |
| Paris | NULL | 6 |
+----------+------+----------+
I want this:
John Alexander I have a table tablewith the following data: +----------+------+----------+
| location | sold | scrapped |
+----------+------+----------+
| Paris | 5 | NULL |
| Paris | NULL | 6 |
+----------+------+----------+
I want this: