Sponsored Content
Full Discussion: Complex MySQL Query(s)
Top Forums Web Development Complex MySQL Query(s) Post 302453641 by STOIE on Thursday 16th of September 2010 01:28:41 AM
Old 09-16-2010
How about this:

Code:
select id, pid, name (SELECT max(saved) WHERE pid = 2.pid) AS max_date, (SELECT min(saved) WHERE pid = 2.pid) as min_date  
	from property property1
	where saved = (select max(saved) from property where pid = property1.pid)
	ORDER BY max_date;

Does this sound better...?

Bear in mind this is from an oracle guru...
Anyway, will check this out when I get home and have a db to play around with.

@ NEO
I am sure I could do that, but really wanted to package it neatly into a query.
Programming is being done in PERL

Last edited by Neo; 09-16-2010 at 02:32 AM.. Reason: cod tags
 

8 More Discussions You Might Find Interesting

1. Programming

Need help with complex SQL query (Sybase)

Hello, I have three tables. I need an SQL query (preferably Sybase) that will return all of the stringID values of table B where the following conditions exist: (1) B.intID = A.intID (2) B.intID != C.intID or (B.intID = C.intID and (C.v1 = 0 or C.v2... (2 Replies)
Discussion started by: chatieremerrill
2 Replies

2. Programming

How to query one to many mysql

Hi there, I have a hierarchical database that include 4 tables. Table A is the parent of B, B is Parent of C, C is parent of D. If I want to query everything in D that is associated with A.name, how do I do that? Thanks! YanYan (0 Replies)
Discussion started by: pinkgladiator
0 Replies

3. Web Development

mysql query help

hello all i have 2 columns every column in the following format column1 2011-04-01 11:39:54 column2 2019-02-03 00:00:00 i want get difference between above data as following 2 days 11:39 how to do so ? i tried many functions but nothing works please advice what is the query... (6 Replies)
Discussion started by: mogabr
6 Replies

4. Shell Programming and Scripting

Complex query

A file whose location i am not aware of contains the below text <url>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(FAILOVER=on)(ADDRESS=(PROTOCOL=TCP) (HOST=ngm2sn1p2-vip.mybank.net)(PORT=4001))(ADDRESS=(PROTOCOL=TCP)(HOST=ngm2sn2p2-vip.mybank.net)... (1 Reply)
Discussion started by: mohtashims
1 Replies

5. Programming

mysql query help

Hello i have created mysql query to compare to values and get difference in percentage as following: SELECT file_name, 100 - ((100 * (SELECT file_count FROM xipi_files z WHERE x.file_group = z.file_group AND x.file_name = z.file_name AND z.insert_date = CURDATE( ) - INTERVAL 1 DAY)) /... (1 Reply)
Discussion started by: mogabr
1 Replies

6. Shell Programming and Scripting

Complex string search query.

Hi, I wish to find the latest occurance of the below string in my log file. Once found, I need to search the below string after the above string and display this Request 331489 has passed or Request 331489 has failed I would like my query to be platform... (11 Replies)
Discussion started by: mohtashims
11 Replies

7. Shell Programming and Scripting

Complex Query regarding folder size

Hi, I provide the path to a folder. I would like so drill in each folder inside the folder i gave and show me the size in human readable form du -sh <folder-name> of the top 8 folders with maximum sizes. For example: Path of the folder: "/opt/app/myapp" has these directories. ls... (2 Replies)
Discussion started by: mohtashims
2 Replies

8. Programming

Need help in mysql query

Hi All, i have a table in mysql with the following data Table name Test Assettype Serial_No Status location Mouse 123456 In Stock chennai Mouse 98765 Allocated chennai Keyboard ... (2 Replies)
Discussion started by: venkitesh
2 Replies
kill(2) 							System Calls Manual							   kill(2)

NAME
kill(), raise() - send a signal to a process or a group of processes SYNOPSIS
DESCRIPTION
The system call sends a signal to a process or a group of processes, as specified by pid. The signal to be sent is specified by sig and is either one from the list given in or The system call sends a signal to the executing process or thread. The signal to be sent is specified by sig and is either one from the list given in or In a single-threaded process the effect of the function is equivalent to calling When used in a multithreaded program, the function sends the signal specified by sig to the executing thread. The effect of the function is equivalent to calling If sig is (the null signal), error checking is performed but no signal is actually sent. This can be used to check the validity of pid. The real or effective user ID of the sending process must match the real or saved user ID of the receiving process unless the sending process has appropriate privileges. As a single special case, the continue signal can be sent to any process that is a member of the same session as the sending process. The value is defined in the file and is guaranteed not to be the ID of any process in the system or the negation of the ID of any process in the system. If pid is greater than zero and not equal to sig is sent to the process whose process ID is equal to pid. pid can equal unless sig is or If pid is sig is sent to all processes excluding special system processes whose process group ID is equal to the process group ID of the sender. If pid is and the sending process does not have the appropriate privileges, sig is sent to all processes excluding special system processes whose real or saved user ID is equal to the real or effective user ID of the sender. If pid is and the effective user ID of the sender is a user who has appropriate privileges, sig is sent to all processes excluding special system processes. If pid is behaves much as when pid is equal to except that sig is not sent to the calling process. If pid is negative but not or sig is sent to all processes (excluding special system processes) whose process group ID is equal to the absolute value of pid, and whose real and/or effective user ID meets the constraints described above for matching user IDs. Security Restrictions Some or all of the actions associated with this system call are subject to compartmental restrictions. See compartments(5) for more infor- mation about compartmentalization on systems that support that feature. Compartmental restrictions can be overridden if the process pos- sesses the privilege (COMMALLOWED). Processes owned by the superuser may not have this privilege. Processes owned by any user may have this privilege, depending on system configuration. Some or all of the actions associated with this system call require the (OWNER) and/or the (REBOOT) privileges. Processes owned by the superuser will have these privileges. Processes owned by other users may have privilege(s), depending on system configuration. See privi- leges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
Upon successful completion, a value of is returned. Otherwise, a value of is returned and is set to indicate the error. ERRORS
If fails, no signal is sent. is set to one of the following values. sig is neither a valid signal number nor zero. sig is or and pid is that of the initialization process (also known as The user ID of the sending process is not a user who has appropriate privileges and its real or effective user ID does not match the real or saved user ID of the receiving process. The sending and receiving processes are not in the same session and the real or effective user ID does not match the real or saved user ID of the receiving process. No process or process group can be found corresponding to that specified by pid. If fails, no signal is sent. is set to the following value. sig is neither a valid signal number nor zero. APPLICATION USAGE
Threads Considerations can be used to post signals to another process but cannot be used to post signals to a specific thread in another process. For information on posting signals to specific threads within the same process, see pthread_kill(3T). LWP (Lightweight Processes) Considerations Signals cannot be posted to specific LWPs in another process. AUTHOR
was developed by HP, AT&T, and the University of California, Berkeley. SEE ALSO
kill(1), getpid(2), setsid(2), signal(2), sigqueue(2), pthread_kill(3T). STANDARDS CONFORMANCE
kill(2)
All times are GMT -4. The time now is 10:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy