text:
Pre-General Availability Draft: 2017-05-29
comparison_operatorANY (
operandIN (
comparison_operatorSOME (
comparison_operator is one of
these operators:
= > < >= <= <> !=
ANY keyword, which must follow a
comparison operator, means "return
if the comparison is
TRUE for
ANY of the values in the column that the
subquery returns." For example:
SELECT s1 FROM t1 WHERE s1 > ANY (SELECT s1 FROM t2);
Suppose that there is a row in table
(10). The expression is
TRUE if table
t2 contains
(21,14,7) because there is a value
7 in
t2 that is less than
10. The expression is
FALSE if table
t2 contains
(20,10), or if table
t2 is
empty. The expression is unknown (that is,
NULL) if table
t2 contains
When used with a subquery, the word
IN is an
alias for
= ANY. Thus, these two statements
are the same:
SELECT s1 FROM t1 WHERE s1 = ANY (SELECT s1 FROM t2); SELECT s1 FROM t1 WHERE s1 IN (SELECT s1 FROM t2);
IN and
= ANY are not
synonyms when used with an expression list.
IN can take an expression list, but
= ANY cannot. See
Section 13.3.2, "Comparison Functions and Operators".
NOT IN is not an alias for
ANY, but for
<> ALL. See
Section 18.104.22.168, "Subqueries with ALL".
The word
SOME is an alias for
ANY. Thus, these two statements are the same:
SELECT s1 FROM t1 WHERE s1 <> ANY (SELECT s1 FROM t2); SELECT s1 FROM t1 WHERE s1 <> SOME (SELECT s1 FROM t2);
Use of the word
SOME is rare, but this
example shows why it might be useful. To most people, the
English phrase "a is not equal to any b" means
"there is no b which is equal to a," but that is
not what is meant by the SQL syntax. The syntax means
"there is some b to which a is not equal." Using
<> SOME instead helps ensure that
everyone understands the true meaning of the query.
if there is a row containing (10) in table t1, the expression is true if table t2 contains (20,10) because 10 is not equal to one or more (i.e., some) of t2's values, namely the 20.
A NOT IN condition, otoh, would be false. NOT IN is always going to be at least as hard to satisfy (as <> SOME) because to be true /all/ rows have to be non-equal.
CREATE TABLE paper
paperid INTEGER NOT NULL AUTO_INCREMENT,
title varchar(256) not null,
PRIMARY KEY(paperid)
# One paper can have many reviewing,
# table reviewing contains the reviewing records.
CREATE TABLE reviewing
reviewingid INTEGER NOT NULL AUTO_INCREMENT,
paperid INTEGER NOT NULL,
reviewerid INTEGER NOT NULL,
unique(paperid, reviewerid),
PRIMARY KEY(reviewingid),
FOREIGN KEY (paperid) REFERENCES paper (paperid),
FOREIGN KEY (reviewerid) REFERENCES reviewer (reviewerid)
#table score , each record contains the score of each reviewing and each questions
CREATE TABLE score
reviewingid integer ,
score integer,
FOREIGN KEY (reviewingid) REFERENCES reviewing (reviewingid)
#find all paperid that are not dont from reviewing
# Finish reviewing paper are paper that
# for each reviewing answer 9 QAs
# for paper there are three done reviewings.
# We want to find paper that are not done from reviewing.
SELECT paperid from paper
WHERE paperid not in
SELECT paperid FROM
SELECT paperid, COUNT(paperid) as numdonereviewing from
SELECT reviewing.paperid , COUNT(*) as numcheck from reviewing, score
where reviewing.reviewingid = score.reviewingid
GROUP by reviewing.reviewingid
) as temp1
WHERE numcheck = 9
GROUP by paperid
) AS temp2 WHERE numdonereviewing >= 3
Suppose you want to create foreign keys on an existing table with orphans. If you try to ALTER TABLE to create the foreign keys, get the dreaded:
error 1452 "cannot add or update a child row: foreign key constaint fails"
This is a good thing, because after implementing foreign keys you want your tables to be consistent, and not contain orphans, so you must delete them beforehand.
Given tables 'child' and 'parent' where child.parent_id is a foreign key referencing parent.id, use the following to clean up any orphans.
DELETE FROM child WHERE child.parent_id NOT IN (SELECT id FROM parent)


text:
Deori Mata" Temple. Do take a stop for a visit to the temple.
I am finishing this article and my bags are already packed for the next trip...Happy Travelling Gaurav...
Ranchi is the capital city of Jharkhand. Just on the outskirts of Ranchi on the way to Jamshedpur is a place from where you can buy excellent Honey. I myself bought "Neem" and "Litchi" Honey.
Jamshedpur is also called the steel city of India and is one of the main steel producing centers for TATA Steel.

subset: commoncrawl


text:
Five parts today.
Sofia Vergara and Reese Witherspoon getting ready on the set of their movie in case Lindsay Lohan shows up.
Lots of parties last night and Taylor Schilling and
Jaime King went to the one that got them a free watch.
Victoria Beckham walks out of her hotel like it is a runway.
Reader Photo #1
Reader Photo #2
Reader Photo #3
Reader Photo #4
Reader Photo #5


text:
Catholic Political Ad "Test of Fire" Continues to Make Waves
posted at 11:13 am on June 1, 2012 by Dustin Siggins
In a recent political ad, Catholics Called to Witness (CC2W) tells Catholics to look at all of the issues facing America this November (including energy, jobs and the economy). Among these issues are gay marriage, abortion, and religious freedom/the contraceptive mandate. Near the end, the ad (which has gone viral in the nearly three months it's been out) says votes related to these three issues "will affect the future–and be recorded in eternity."
Personally, I thought the ad was right on point–abortion and the contraceptive/sterilization/abortifacient mandate are, in my opinion, two critical political issues this fall for any Catholic in good standing with the Church, and every Catholic should oppose gay marriage. However, this ad naturally drew controversy. One person who opposed the ad's message was Frank Cocozelli, a New York City lawyer who writes for the liberal blog Daily Kos. Unfortunately, Cocozelli makes a couple of significant errors in his post, and is misleading at other points.
First, Cocozelli says Catholics Called to Witness claims some issues (life, marriage and religious freedom) are "non-negotiable," and indicates they are prioritizing the issues as an independent organization. This is technically inaccurate. While the group does say this in the ad, CC2W is merely repeating the Catholic Church's official position on the matters. While the Church's moral positions on issues that do not concern grave or intrinsic evils (such as those relating to immigration, health care and social justice) are to be heeded, the Church acknowledges that the complexity of the issue is such that the respective moral concerns may be addressed by a number of acceptable proposals. Thus, the Church defers to the "prudential judgment" of statesmen and policy professionals, without regard to partisanship. This deferential treatment is not given to gay marriage, abortion or contraceptives.
Second, Cocozelli disputes claims that President Obama is anti-Catholic. While I think it is debatable as to whether or not the contraceptive mandate was specifically meant to target the Church, it is not debatable that the Church will likely be compelled to shut down its hospitals (about one-sixth of all hospital beds in the nation are Catholic), schools and other religiously-affiliated organizations across the nation should the contraceptive mandate be in place come August 2013. It is also fairly clear that the Administration misled Archbishop Dolan regarding the mandate in November 2011.
Third, Cocozelli says "…there may be more going on here than using Catholic damnation anxiety as a tool to roll back marriage equality and reproductive rights. The video may also be part of a wider effort to eradicate public education." Eradicate public education? To back this rather sensational accusation, Cocozelli cites associations the video's creators have with several groups like the Home School Legal Defense Association (HLDSA). However, Jeremiah Lorrig, Director of Media Relations for HSLDA, told me the organization's mission is to "promote parental rights so they can decide on the best educational choices for their children … public or private." Michael Ramey, Director of Communications & Research for ParentalRights.org – another group targeted by Cocozelli – e-mailed me the following: "Millions of parents all over the country rely on public schools as the means by which they exercise their right to direct their child's education. They will continue to do so under [our proposals]. Any charge to the contrary is ridiculous."
Fourth, the author writes that CC2W's prioritization of ""the right of parents to educate their children… is a curious cause for a group of Catholic orthodox types to champion. There is nothing in Church teachings that make this a priority on par with any other social justice teaching." This statement by Cocozelli seems at odd with the Church's Canon Law, which among other things says "Parents must possess a true freedom in choosing schools; therefore, the Christian faithful must be concerned that civil society recognizes this freedom for parents and even supports it with subsidies; distributive justice is to be observed." The statement also ignores this Catholic University of America speech by Pope Benedict XVI in 2008 in which he specifically highlighted the importance of education in and to the Church.
Finally, Cocozelli says the ad explicitly implies damnation to hell if one votes for a candidate (i.e., President Obama) who supports the three "non-negotiables." However, my viewing of the ad is merely that a voter who will support candidates in opposition to the Church on these moral and faith teachings will have to own that support–as they will have to own every act in their lives–when facing Christ at the gates of heaven.
Before writing this post I managed to track down Cocozelli's law office in New York to ask him about his knowledge related to the Church being correct on all matters of faith and morals. He explained that he was indeed raised Catholic, and indicated he felt social justice issues were paramount, as opposed to the non-negotiables described in the ad. I left my conversation with Cocozelli on cordial terms, and I think his intent in going after the ad was well-intentioned (as opposed to, say, this Daily Kos poster, who apparently believe the video's message was organized by the Church's hierarchy). Unfortunately, though, it seems his political viewpoints got in the way of the facts on a number of occasions, most importantly in ways that could mislead the reader as to how Catholics ought to make decisions on political decisions related to faith and morals.
[This was posted in its original form at FirstThings.com]


text:
I'm interested in the southern NM trips as well. only been through alamogordo and cloudcroft a couple times.
I'm interested in the southern NM trips as well. only been through alamogordo and cloudcroft a couple times.
Keep me in the loop for any trips, living in Farmington New Mexico I am the four corners
Very could have I also belong to the Creeper Jeepers 4x4 club up in Durango. Here's a pic of the current light duty trail/trip rig.
Could you add me to an email list or contact list? I work too much and am never around but if the stars all lined up perfectly I may be able to join..! Thanks.. Glenn
I'm all around that area also. I live most of the time in Flagstaff, moved here from Farmington, but my house is in Montrose.. hahahaha..
'00 Tundra
'05 Tundra DC
Are you up for something next Thursday around South West NM??
I'd like to be kept in the loop on future trips also, Im here in El Paso.
1995 Cherokee- 4.0L HO, AX15, NP231, D30, Chrysler 8.25, 235.75.15 Adventuro M/T on Wrangler Steelies, 2" Spacer Lift, Class II hitch front and rear, CherryBomb Turbo Muffler, JCR Lightbar with 4 Hella 500s
Project Overlander - Formerly known as Project Arcangel
Mod Progress - [||||||----] 55% or so.


text:
So, back again with another critique, and a question:What would you say about a guy who is willing to get a car thats insanely cheap (under 13K) but gets a poor rating for side impact with side airbags? Furthermore, what would you say about this guy, knowing he has a 6-year-old daughter who would be most likely killed in a side-impact-crash?Case in point, my husband now has his eyes on the Suzuki Aerio SX (wagon). He still likes the Fit (and was actually dissapointed when we couldn't find one to test drive), but the price (which is close to under 15K) just doesn't seem cheap enough.I highly dislike the Suzuki for interior looks, cheapy materials, and extrememly disturbing safety ratings for the side. Am I so wrong to not place a price on a person's life, and desire the more expensive, but safer, car?Any input would be greatly appreciated.~Sarah
i think you have it right sarah. i mean, as parrents people choose the best places to live and work. why not the best car to drive? remember there are lots of dumb people driving out there.
Wow. Can't believe what I'm reading, but I guess what you're saying is true.I actually know someone who owned an Aerio, and got into an accident. They wouldn't even let him see HIS OWN CAR after he woke up in the emergency room. Everyone in the car was nearly killed, and it wasn't even that bad of an accident. Before this happened, he had to replace the brake pads three times in 6 months and had to have the sway bar replaced because the sway was so terrible, and it was causing this insane squeeking noise. Other people that bought this car that I know complained that it really doesn't get the great gas mileage that the sticker will tell you. It says in your thread that you have a child with your husband. Some other folks said that unless the people in the front are 5 feet tall, forget about putting a car seat in the back, because its kindy dinky, unlike what the dealer will tell you. So, I don't know why anyone, as you said, would "put a price on someone's life", but from what I've heard, this car really isn't the greatest, and your husband is being really cheap.
Your husband is wrong; safety and quality should be top priorities, not price. Especially with a 6 year old daughter. If you could get a Yugo for a substantially lower price than other cars, would you still buy one?
I completely agree with you. IMO push for a Nissan versa (same price as the mitsubishi) Mazda 3 or toyota Yaris...
Believe me, I understand that he wants an inexpensive car.
I just don't want anyone to think I hate the guy. I love him with everything. I just don't want him to make a mistake that could cost someone their life.
And please, lets make sure we're commenting about the car, not my husband. I know he's not the only person who wants a deal on a car.
Does it have to be a new car? $15K can get you a really good non-econobox car loaded with options, as opposed to the base model of an economy car. Just make sure you guys do a lot of research before you settle on one car!
[image]http://ohv.prettyblack.jp/1971roadrunner2.jpg [/image]
A deal on a car is one thing...we all want to get the best deal we can; but you need to factor in the price of your families safety and, as was mentioned earlier, the price of frequent trips to the dealer. I would't touch a suzuki car (their suv's are getting alright, actually) with a very long stick...unless said stick was aflame.
Thank you for the well, thought-out critique. Its comments like this that will help us on our car search.~Sarah
I understand your ardor against the aerio, but you have to understand that my husband is not cheap. Money is tight, especially with gas prices, and he simply wants to get a good deal. I thank you, for your critiques, as well as the real-life experience. I hope that your friends are okay after the accident.~Sarah
Believe me, these forums are just a modicum of the research that we're doing in order to get a new car. I don't know if he's considered a new car..I think after driving his older car for so long, he wants something new and shiny! But I thank you for the comments!~Sarah
My friends are okay, but as I said before, they wouldn't even let him see his car afterwards because it was so brutalized. And I'm sorry for calling your husband cheap...your thread just elicited some harsh memories.
Have you considerered the HHR? I'm not totally sure what the safety rating is, or if you like the boxier-than-thou styling, but they're reliable, pretty well built, 4 dors, good ammount of room, and...AND...they're sitting on dealer lots, they're going at really serious discounts right now PLUS! GM is offering zero-percent (i know, I know, you can't have zero percent) financing on all new car purchases for a limited time. That's a good savings right there.
[image]http://ohv.prettyblack.jp/1971roadrunner2.jpg [/image]
Quote:I just don't want anyone to think I hate the guy. I love him with everything. I just don't want him to make a mistake that could cost someone their life.


text:
The Prime Minister's first instinct over the recovery of the 29 men killed in the Pike River mine tragedy was the right one. This led him only last month to reiterate to the families of the victims that the Government was unlikely to fund the recovery of whatever might remain of their bodies because its experts said this was too dangerous and expensive. Now, however, John Key has changed his mind. Shortly before Christmas, he wrote to Solid Energy, the mine owner, saying a new expert panel would be established to advise the Government on the feasibility of body recovery. That is simply a sop to the families who would have been better served by realism.
Like all New Zealanders, Mr Key feels the sadness of the families. It is hard to accept that the remains of their loved ones will, very likely, never be recovered. This has led them to vigorously oppose the verdict of the Government's experts. The families' efforts have included locating three international experts who say the recovery of the bodies is possible.
They have also included badgering the Prime Minister. According to Bernie Monk, a spokesman for the families: "I told him 'you and I are going to be arguing about this for the next 10 years. We aren't going away'."
A panel of mining experts from diverse backgrounds, including from Solid Energy, the Mines Rescue Trust, the Pike families and the Government's High Hazards Unit, will now be assembled to try to reach a consensus on whether recovery is possible, plus its risks and costs. The Government will pay the cost of the return to New Zealand of the families' experts. It has also pledged to pay all out-of-pocket costs to explore the mine's 2.3km tunnel, where some bodies might remain, if a viable plan that satisfied the High Hazards Unit was developed.
That represents a significant cost to the taxpayer which could become even more substantial. The latter scenario is unlikely, however. Elaborate plans so far hatched to recover the bodies have been largely impractical. There is little to suggest that anything more than a token gesture is feasible. One of the families' experts, a former British principal mines inspector, Bob Stevenson, has conceded that high volumes of explosive methane gas were trapped underground. Mines had been re-entered many times in Britain, he said, but none had operated under such "appalling"' standards as Pike River.
Solid Energy has said the remains will be recovered only as part of future commercial mining operations and if it was "safe, technically feasible and financially credible to do so". That reasonable approach was agreed to last year by the Government. There is no good reason for the Prime Minister to have suddenly changed tack.
Mr Key's December 20 letter noted that he was "very keen for the families to have closure one way or another as soon as reasonably possible". In all likelihood, however, he is simply dragging out that process. Solid Energy's message when it took over the mine gave the families something approaching certainty. They were told there was only a 5 to 10 per cent chance of recovery, a view confirmed by two Australian mining experts.
That meant, effectively, that the remains of the Pike River men would share the fate of many other victims of mine explosions, including that of the two of those killed in the 1967 Strongman tragedy. Now, however, the Prime Minister has rekindled the families' hopes. All that will achieve is a delay in the acceptance of reality.


text:
Alessandro Acquisti:
What will a future without secrets look like?
The line between public and private has blurred in the past decade, both online and in real life, and Alessandro Acquisti is here to explain what this means and why it matters. In this thought-provoking, slightly chilling talk, he shares details of recent and ongoing research — including a project that shows how easy it is to match a photograph of a stranger with their sensitive personal information.
Similar topics
- Business
- Policy
- Privacy
- Social media
- Technology
This talk was presented at an official TED conference, and was featured by our editors on the home page.
Related talks
133 comments
Enthusiastically agree? Respectfully beg to differ? Have your say here.
Log in to comment Don't have an account? Sign up now — it's fast and free.
Sort comments by
There are currently no comments for this talk.