Nathan Thatcher escreveu:
I have, what I imagine to be, a fairly simple question. I have a query
that produces output for a line graph. Each row represents an interval
on the graph.
SELECT COUNT(call_id) AS value, EXTRACT(hour from start_time) AS hour
FROM c_call WHERE start_time >= '2008-08-01
William Temperley escreveu:
Hi all
I'm trying to calculate the percentile rank for a record based on a
'score' column, e.g. a column of integers such as:
23,77,88,23,23,23,12,12,12,13,13,13
without using a stored procedure.
So,
select count(*) as frequency, score
from scoretable
group by score
Volkan YAZICI escreveu:
Mike Ginsburg <[EMAIL PROTECTED]> writes:
There is probably a really simple solution for this problem, but for
the life of me I can't see to think of it. I have three tables
--contains u/p for all users in the site
TABLE users (user_id INT primary key, username VARCHAR(
josep porres escreveu:
maybe this?
select value, max(id) as id, max(order_field) as order_field
from mytable
group by value
order by 3
Wrong. For the op data you will obtain tuples not in original relation.
bdteste=# SELECT * FROM foo;
id | value | order_field
+---+-
Reg Me Please escreveu:
Il Monday 12 November 2007 17:05:18 Dimitri Fontaine ha scritto:
Hi,
Le lundi 12 novembre 2007, Reg Me Please a écrit :
What I'd need to do is to "filter" t1 against f1 to get only the rows
( 'field1',1 ) and ( 'field2',1 ).
select * from t1 natural join f1 where t1.id
smiley2211 escreveu:
Hello all,
I am using the query below to generate SQL code to grant access to objects -
how do I get this statement to PULL the fully qualified name
(schema.tablename)???
*
SELECT 'GRANT SELECT, INSERT, UPDATE, DELETE ON ' || relname ||
' TO newuser
Cultural Sublimation escreveu:
Hi,
I am not sure if this qualifies as a bug report or a feature request,
but I don't see any way to tell Postgresql that the members of a record
cannot be NULL. This causes all kinds of problems when this record
is used to declare the return type of a function.
Wei Weng escreveu:
Hi all
I want to implement something like the following:
CREATE OR REPLACE FUNCTION AddDays
(TIMESTAMP WITHOUT TIME ZONE
, INT)
RETURNS TIMESTAMP WITHOUT TIME ZONE AS '
DECLARE
time ALIAS FOR $1;
days ALIAS FOR $2;
BEGIN
RETURN time+days*24*
Alejandro Torras escreveu:
-- English --
Hi,
Is there some way to put values in a INSERT statement
without taking care of apostrophes?
In example:
INSERT INTO persons VALUES ('Harry', 'O'Callaghan');
^^^
I think that it can be used some kind of len
Warren escreveu:
I need to check if the last two characters of a field are a number. I am
trying something like this but it does not want to work.
substring(TRIM(field8) from '..$') SIMILAR TO '\d\d'
How should I do this?
Try:
SELECT your_field ~ '.*[[:digit:]]{2}$';
Osvaldo
A. Kretschmer escreveu:
am Mon, dem 07.05.2007, um 0:39:43 -0700 mailte nij es folgendes:
sir,
I am using postgresql 7.3 in Redhat Linux.Windows XP is my client. I want to
communicate pgsql without a specific ip rangeI.I want to accept all ip address
in postgresql 7.3. How can i comunicate. P
Raymond O'Donnell escreveu:
'Lo all,
I've created a calendar table based on an article I found on the web,
but I can't figure out what's wrong with the query I've written to
populate it. Here's the table -
CREATE TABLE aux_dates
(
the_date date NOT NULL,
the_year smallint NOT NULL,
the
12 matches
Mail list logo