The culture war is a deliberate distraction

Capitalism is the best economic system for the overall creation of wealth. However it is lousy at distributing that wealth fairly between the people who contributed to the creation; and it equally sucks at all other issues which require solidarity (e.g. health care) or involve the common good (e.g. the environment). After WWII it appeared that the first world countries had solved that problem: They had all created political systems in which “the right” fought for freedom and capitalism, and “the left” fought for fair distribution, solidarity, and the common good. Alternating between left and right governments created a balance, and even allowed different countries to arrive at different points on that balance, e.g. Scandinavian countries having more solidarity, and the US having more capitalism.

However the system had one inherent flaw: Politicians are by definition members of the elite, the ruling class. And that is true for left wing politicians as well. Thus a right wing politician fighting for unfettered capitalism that makes the rich richer and the poor poorer was both following his party politics and his own greed. While the left wing elite was naturally less inclined to fight for policies that aided less well off, because it didn’t help them personally. So at various points in the 90’s the left wings in different countries simply gave up on economic policy for fairer distribution of wealth, and just joined the capitalist camp which made the elite richer. Today a left wing politician like Bernie Sanders or Jeremy Corbyn who still push for some economic fairness and solidarity are considered as “odd” and decried as “communists”.

Now this has created a growing rift between voters and the elite that leads them in politics and media. The people simply isn’t represented any more. They are being fed lies like “your salaries are only low because of immigrants” or “tax cuts for the rich will trickle down to you”. In their desperation they increasingly vote for extremists and populists, and end up harming themselves even more through the resulting policies. And the left and right wing elite in order to be seen to do something play acts a culture war to distract the masses from the real problems.

In Germany there is an organization of soup kitchens which collect food past its sell-by-date and distributes it to people who are so poor that they have to beg for food. One local organization recently made headlines because they enacted a controversial “Germans first” policy, after food fights had broken out in which younger male immigrants shoved aside elderly German grandmothers. And the discussion is all about the culture war, with the left fighting for equal rights for the immigrants, and the right defending priority for the natives. Only the extreme left is mentioning the real problem: That in one of the world’s richest countries, at the top of the economic cycle and full employment, there are still so many people having to beg for old food that the soup kitchens can’t feed all of them.

As Bill Clinton still knew, “it’s the economy, stupid”. If the centrist parties fail to represent the economic interests of the majority of the population, they will fade into irrelevance. History repeats itself, and the rise of populist parties in Europe in the 1930’s (not just in Germany) isn’t really the example we would want the world to follow. We need to see the culture was as the distraction that it is, and concentrate on the real economic problems.

Why Even the Idea That Neocon Senator Tom Cotton Might Run Trump’s CIA Is Scary

The Strangelovian senator apparently subscribes to a world war without end.

In a recent profile of Tom Cotton, the Wall Street Journal’s Jason Willick characterized the 40-year-old junior Republican senator from Arkansas as “hawkish and realistic” and described his worldview as “tinged with idealism.” Yet it was unclear what the unabashedly Strangelovian Cotton did to earn such a charitable description, as he rattled off a series of opinions that amounted to a call for world war without end.

Cotton told Willick he favored arming Japan and South Korea with nuclear weapons to counter North Korea, an unprecedented escalation that would bring the region a stride closer to armageddon. China, according to Cotton, is a “rival in every regard” that must be isolated economically and confronted militarily with aggressive freedom of navigation operations in the South China Sea. (The senator ignored a recent Rand assessment that found the US could easily find itself outmatched in a duel with the Chinese military.) From eastern Europe to Asia to the Middle East, Cotton urged regime change operations to replace governments that resisted Pax Americana with “countries that share our principles.” On Iran, Cotton would accept nothing short of war, imagining a cakewalk that would only require “several days” of bombing, as he has previously said.

Cotton’s comments are worth considering in light of his status as a rumored potential CIA director in the Trump administration. Reports recently surfaced of a coming reshuffle that would move Mike Pompeo, a longtime stooge of the Koch brothers and evangelical Muslim basher, from CIA to Secretary of State, dislodging the insufficiently loyal Rex Tillerson, who Trump has trashed as “weak on everything.” While the Cotton rumor has been tamped down in recent days, if Cotton truly is next in line for the CIA, a key agency of the US empire stands to fall into the hands of a militant neoconservative whose worldview was formed through prolonged cultivation in a right-wing hothouse.

Cotton would hardly be the first ideologue to take the helm at Langley. During the 1950s, Allen Dulles used the CIA as a vehicle to recruit a collection of Nazi war criminals and mafia henchmen for covert anti-communist campaigns across Europe, develop the failed mind control program MK ULTRA and plot assassinations and international intrigues in order to topple popular governments. Then there was Bill Casey, who painted the Soviet Union as the puppet master of international terrorism in order to justify secretly funding Central American death squads through the world’s most unsavory third parties.

But Cotton is in a class of his own, not because he is an unbridled zealot, but because he would be the first fully developed product of the neoconservative movement to rise to such a sensitive position. If appointed, he is almost certain to militarize intelligence in the service of the Saudi-Israeli axis and drive their destabilizing anti-Iranian agenda to terrifying extremes.      

The path to power, from Harvard to Iraq

Cotton’s grooming as a neocon cadre began at Harvard University, where he won a fellowship from the Claremont Institute, a right-wing think tank in California that fused the anti-gay kulturkampf with libertarian “starve the beast” economics. At the Harvard Crimson, Cotton emerged as a prolific voice of preppy reaction, promoting divorce-proof “covenant marriages” as a remedy for social decay, upholding political apathy as a virtue and activism as a vice, and hailing the valor of professional golfers. Cotton’s senior thesis at Harvard was an ode to the most elitist, anti-democratic themes contained in the Federalist Papers. “Inflammatory passion and selfish interest characterizes most men, whereas ambition characterizes men who pursue and hold national office,” Cotton wrote of the Founding Fathers. “Such men rise from the people through a process of self-selection since politics is a dirty business that discourages all but the most ambitious.”

His own ambition vaulted him into the ranks of the U.S. Army as it barreled across Iraq and sent the country spiraling into a sectarian bloodbath. From inside armored personnel carriers and behind the barrel of a gun, Cotton experienced his only substantive engagement with the people of the global south. It was clearly a formative period that left him brimming with hostility. “One thing I learned in the Army is that when your opponent is on his knees, you drive him to the ground and choke him out,” he reflected this October. Though he failed to earn any special distinction on the battlefield, Cotton resorted to opinion writing to earn a bit of fame back home.

In January 2006, New York Times correspondents Eric Lichtblau and James Risen revealed the existence of a warrantless CIA program that examined the financial records of American citizens suspected of terrorist involvement. The story appeared almost simultaneously in several other papers, triggering a public tantrum from Vice President Dick Cheney. From his garrison in Iraq, Cotton saw a perfect opportunity to rally the conservative shock troops back in the States. He fired off an indignant email to the New York Times and cc’ed a right-wing blog, Powerline, for good measure. Citing his credentials as a Harvard Law grad and former law clerk, Cotton demanded Lichtblau, Risen and their editor, Bill Keller, be jailed under the Espionage Act: “By the time we return home, maybe you will be in your rightful place: not at the Pulitzer announcements, but behind bars,” he thundered at the journalists.

George W. Bush’s approval rating was hovering around 30 percent by this point, public support for the war had evaporated and Americans were coming home by the thousands in wheelchairs and coffins. But here was a young platoon leader—a Harvard Law grad, no less—willing to defend the war on terror against the treasonous nabobs of negativism. When Powerline published the letter, Cotton became an instant folk hero among right-wing Iraq war dead-enders. Before he had even returned home to his family’s cattle farm in Arkansas, his political career had been made.

The great neocon hope

Cotton first entered Congress in 2012 as a representative from the formerly Democratic Arkansas district that contained Bill Clinton’s hometown. Iran-bashing became his hobby horse, prompting him to introduce an extreme “Corruption of Blood” bill that would have forbidden trade with the relatives of Iranian individuals who were under sanctions, from their great-grandchildren to their nieces and uncles. Panned as an outrageous violation of the Constitution, the bill died on the House floor, an embarrassing rebuke to the self-styled constitutional law expert. (Article III of the Constitution forbids punishing the relatives of those convicted of treason, while the Fifth Amendment grants due process even to non-citizens charged with crimes.) 

Cotton struck out the following year on a campaign to unseat incumbent Democratic Sen. Mark Pryor. On the stump, he demonstrated all the charisma of a filing cabinet, compensating for his lifeless delivery with incendiary warnings that a coalition of ISIS terrorists and Mexican drug cartels would overrun the country unless the southern border was sealed off with a Maginot-style wall. Cotton won in a landslide, sailing into the Senate on the strength of surging anti-Obama sentiment and piles of cash from Likudnik oligarchs.

As Eli Clifton and Jim Lobe reported, the second largest source of funding for Cotton’s senate campaign was Paul Singer, the pro-Israel venture capitalist who has bankrolled a who’s who of neocon outfits in Washington. Cotton also benefited from nearly a million dollars in supportive advertising from the Emergency Committee for Israel, a right-wing group founded by the face of the neocon movement, Bill Kristol. ECI operated for a time out of the offices of the Committee for the Liberation of Iraq, the group that drummed up support for regime change in Iraq. This office also housed Orion Strategies, the lobbying firm that has represented the governments of Taiwan and the Republic of Georgia, two of the key US-backed bulwarks against China and Russia.

A relentless drive toward war with Iran

In the Senate, Cotton’s obsession with Iran deepened by the day. Within weeks of his swearing-in, he orchestrated an explosive letter signed by 46 Republican senatorial colleagues and addressed to the “Leadership of the Islamic Republic of Iran.” Published on Senate letterhead, the missive aimed to convince Iranian Supreme Leader Ali Khamenei to disregard the power of President Barack Obama to implement the internationally brokered P5+1 nuclear non-proliferation negotiations. The arguably unprecedented stunt led to accusations that Cotton had violated the Logan Act, which forbade diplomatic freebooting.

While the White House fumed, Cotton tweeted a translated version of his letter to Khamenei, Foreign Minister Javad Zarif and President Hassan Rouhani. But in his haste, it appeared Cotton had acted without the help of a native Farsi speaker and simply run the letter through Google translate: “We hope while the nuclear negotiations are progressing this letter enriching your knowledge of our constitutional system and mutual clear understanding elevating,” the concluding line read.

A day after the diplomatic fiasco, Cotton scrambled off to a private event with the National Defense Industrial Association, the lobbying arm of America’s top arms merchants. Cotton’s rhetoric on Iran was music to the ears of the weapons industry. “The policy of the United States should be regime change in Iran,” he declared. “I don’t see how anyone can say America can be safe as long as you have in power a theocratic despotism.” The senator found a natural ally in Riyadh, the political vortex of theocratic despotism. “This arms deal sends the right message to both friend and foe alike,” Cotton stated, describing it as a step “to maintain peace in the region.”

Cotton has insisted that “there are no mythical moderates” among Iran’s leadership. Even worse, according to him, was the fact that the Iranian government was “already in control of Tehran.” While Cotton melted down over the Iranian government’s presence in its own capital, most Iranians seem to have accepted that the United States was comfortably in control of Washington.

Trump’s open embrace of the Saudi-Israeli axis has elevated Cotton’s influence, transforming him into the administration’s congressional Iran whisperer. While advising efforts to whittle away at the Iran nuclear deal, he has co-sponsored legislation to make it easier to reimpose sanctions despite Iran’s faithful compliance with the agreement. Cotton’s presence in the Senate is so central to the neocon agenda that the Weekly Standard’s Fred Barnes has argued against his promotion to CIA director. But as Cotton made clear in his senior thesis long ago, he views himself as a man of destiny driven to the heights of power by limitless ambition. Before long, the world could become a laboratory for his own “inflammatory passion.”


Related Stories

  • Here’s How Trump Is Pitting Local Police Against the FBI
  • Trump Is Really Trying to Set the World on Fire
  • Evangelical Leader Who Criticized Trump Is Swamped with Death Threats from the ‘Christian Machine’

Latest Razer Phone update delivers camera and audio improvements

We noted in our Razer Phone review that the photography performance was garbage. The 12 MP dual camera itself was adequate, but it was let down by poor processing, slow shutter speeds, and weak colors. Thankfully, Razer vowed to address some of these camera problems via software updates last month, and today we’ve come across one such OTA.

As reported by GSMArena, Razer is now rolling out a ~97 MB update which brings fixes several welcome improvements to the camera and audio technologies — check out the patch notes below.

Camera improvements:

  • Improved shutter speed in low light and when using HDR
  • Reduced noise and clearer shadows
  • Improved picture quality and better color cast
  • Crushed bugs and performance improvements

Audio improvements:

  • “Tweaked the knobs” for greater clarity during playback
  • Improved call quality for HD Audio
  • Fixed some issues with Dolby Audio

Meanwhile, Razer also lists a “smoothed out” auto-brightness luminosity, updated “Arrival theme icons to a dark style,” and other bug fixes in its list of optimizations. The handset remains on Android 7.1.1 Nougat for the time being, however, with the October security level.

These are much-needed improvements for the Razer Phone, and though we can’t yet attest to the effectiveness of this latest patch (we haven’t seen the update ourselves and it’s not clear which regions it’s currently rolling out in), we’ll be sure to investigate the situation once we do.

What are your thoughts on the Razer Phone? Is it worth the money? Let us know in the comments.

Google is now prioritizing mobile sites to provide better results for mobile devices

best facts apps

We all saw this coming. All the way back in November 2016, Google said it would begin prioritizing websites that have a mobile-friendly, responsive design in favor of traditional desktop online websites. Google is following through on that promise as it’s now implementing this new prioritization method for a “handful of sites.” Quite frankly, the move makes sense given that an ever-increasing amount of people are searching constantly from their phones. Especially when you aren’t at a computer, it’s easier to just pull out the phone that’s in your pocket to search for something.

See also

We’ve all been there, searching for something on Google, when we finally find the information we need, when *gasp*, it’s a desktop site. The change to mobile-first indexing will ensure that this doesn’t happen as often.

Traditionally, Google’s crawling and ranking systems only looked at the standard desktop layout of a website. This is no longer going to be the case.

Google will now use content from mobile sites to create and rank listings, which will allow for more relevant results for mobile users. Google is “evaluating sites independently on their readiness for mobile-first indexing,” and the shift is “closely being monitored by the search team.” If your website is already mobile-friendly, you shouldn’t have to do anything. However, Google does have some guidelines for site owners:

  • Make sure the mobile version of the site also has the important, high-quality content. This includes text, images (with alt-attributes), and videos – in the usual crawlable and indexable formats.
  • Structured data is important for indexing and search features that users love: it should be both on the mobile and desktop version of the site. Ensure URLs within the structured data are updated to the mobile version on the mobile pages.
  • Metadata should be present on both versions of the site. It provides hints about the content on a page for indexing and serving. For example, make sure that titles and meta descriptions are equivalent across both versions of all pages on the site.
  • No changes are necessary for interlinking with separate mobile URLs (m.-dot sites). For sites using separate mobile URLs, keep the existing link rel=canonical and link rel=alternate elements between these versions.
  • Check hreflang links on separate mobile URLs. When using link rel=hreflang elements for internationalization, link between mobile and desktop URLs separately. Your mobile URLs’ hreflang should point to the other language/region versions on other mobile URLs, and similarly link desktop with other desktop URLs using hreflang link elements there.
  • Ensure the servers hosting the site have enough capacity to handle potentially increased crawl rate. This doesn’t affect sites that use responsive web design and dynamic serving, only sites where the mobile version is on a separate host, such as

Thoughts on this change?

Planning a new D&D campaign

As I mentioned before, I am somewhat disappointed by official Dungeons & Dragons adventures these days. The one that comes in a box, the Starter Kit, is great and easy to run. The others, which come as hardcover books, are more problematic. It took me a while to realize that some of those campaign books aren’t in fact adventure modules like the ones from previous editions. Rather they are campaign settings with the odd encounter or dungeon thrown in. They are background and starting point for a campaign, but with much of the actual campaign and story line incomplete.

The intention is probably to get to a more sandbox style of role-playing. However I find that this causes a problem for preparation: I find that D&D sessions where the DM is well prepared run a lot smoother. If the sandbox style is too open and the DM *can’t* prepare and has to improvise everything, the game session becomes a lot more laborious. That is especially true if the DM uses visual aids, like I do: Battle maps, 3D printed miniatures, handouts, etc. all require preparation.

The advantages of full sandbox mode of infinite freedom are also somewhat illusionary. Most of the time players act on little or limited information. The freedom to go north or south isn’t worth much if the decision isn’t meaningful because you have no idea what happens if you go north or if you go south. But of course full sandbox or strictly linear gameplay aren’t the only two options, there are compromises in between the two. And that is what I will be going for in my campaigns in 2018. Basically I will present the players options, but with sufficient information to make each option meaningful. Instead of telling them that they can go in any compass direction they want (which isn’t how humans tend to travel anyway), I present them with a fork in the road with road signs to two different places, and some knowledge (e.g. with history checks or from passing travelers) what is going on in those two places. A meaningful choice between 2 locations is better than full freedom to go anywhere, just to face the same random encounter tables because otherwise there isn’t anything there.

For my Princes of the Apocalypse campaign this is already working well enough. I gave the players some information about the evil elemental cults, including an idea of relative strength. They usually know about at least 2 different locations where they could go next, and what cult is likely to be there. Which means I can prepare both places and be prepared for either choice. But I did use magical portals to block off the deeper dungeons, which not only I would be not prepared for, but which would also be not much fun, being much higher in level than the players.

Next year I’ll try to start a new campaign with new players at my local role-playing club, using the Out of the Abyss campaign setting. So over the holidays I have time to read the book front to cover, and fill out the blanks with the missing story line and alternative options. As I recently wrote, I learned from a good DM / group on YouTube that I shouldn’t worry too much about the story line, but rather make sure that there is enough opportunity for players to contribute to the story with their own ideas. Which means presenting situations in a way that make it clear that players can do other things than just roll initiative and attack. I still believe good tactical combat encounters are important and they are usually fun to play for the players, but they aren’t all there is to Dungeons & Dragons.

Quitting early

I still play a lot of Magic Duels, still nearly exclusively against the AI. It is in the nature of that game that there is a certain randomness which is independent of your skill in building decks or playing the game. Sometimes you don’t draw enough land, or draw the wrong color of land, and sometimes you draw too many lands and no spells to cast. Sometimes you draw exactly the right mana and spells of the right cost to play with that mana and start the game perfectly. The same is true for your AI opponent. Thus sometimes you get in a situation where your AI opponent had a perfect hand and is playing creature after creature, while either don’t have the mana or the spells to do anything much to stop him. After a few turns you already know that you will lose. Knowing that the AI opponent won’t be offended, I frequently quit in situations like that.

One of the reasons why I don’t like playing Magic Duels in PvP mode is that some people think that this behavior is also okay if you play against a human opponent. And I disagree with that. Imagine a sports event where one team decides to give up at half time and not to play the second half of the game, because the first half makes it near certain that they lost anyway. That would be completely unacceptable behavior is sports. Because winning is not the only thing a match is about, it is also about playing. In Magic a human opponent who has set up a great attack doesn’t just want to get a quick and easy win by the other guy conceding, he wants to play out the game until that win. Quitting early is impolite towards that other guy, provided that he isn’t an AI who doesn’t really mind.

A lot of games these days have no penalties at all for quitting. To some extent that is due to the problem that half of all players lose in a PvP game, so games have tried to hide that fact by rewarding the loser a bit and the winner a bit more. And you don’t want a disconnect being interpreted by the game as toxic player behavior and punishing that player by a lot. However that does end up in a situation where quitting early in a game which you aren’t clearly winning might actually be the best strategy. Because games are frequently set up in a way where you can immediately start the next game, and staying until the end of a game when the rewards for losing slowly and quitting early are the same is a waste of time you could have spent winning the next game.

I remember a lot of people in the early days of internet gaming enthusing about the internet bringing people from all over the world together. But somehow that ended up with dehumanizing our human opponents: Many people don’t think of their human opponents as real people any more, but consider them to be more or less equal to an AI opponent. People who would never cheat in a board game with friends around a table do cheat in multiplayer video games. They don’t even consider whether their opponent might quite like to play a game until the actual win condition, but quit early in order to earn rewards in the next game faster. And game design frequently encourages that sort of behavior. Players end up being content in a game for which the devs were too lazy to program an AI. And somehow between all these developments we lost a bit of humanity.

Test Your SQL Basics – Part_2

Conversion Functions Questions

1. What will be the outcome of the following query?
SELECT ROUND(144.23,-1) FROM dual;
  1. 140
  2. 144
  3. 150
  4. 100

2. Which of the following commands is used to count the number of rows and non-NULL values in Oracle database?
  2. INSTR
  4. COUNT

3. Which of the following statements are true regarding the single row functions?
  1. They accept only a single argument.
  2. They can be nested only to two levels.
  3. Arguments can only be column values or constants.
  4. They can return a data type value different from the one that is referenced.

4. Which of the following type of single-row functions cannot be incorporated in Oracle DB?
  1. Character
  2. Numeric
  3. Conversion
  4. None of the above

5. Which of the following is true for the statement given as under.
NVL2 (arg1, arg2, arg3)
  1. Arg2 and Arg3 can have any data type
  2. Arg1 cannot have the LONG data type
  3. Oracle will convert the data type of expr2 according to Arg1
  4. If Arg2 is a NUMBER, then Oracle determines the numeric precedence, implicitly converts the other argument to that datatype, and returns that datatype.

6. What is true about the NULLIF function in Oracle DB?
  1. NULLIF(expr1,expr2) will return expr2 if the two expressions are NOT NULL.
  2. NULLIF(expr1,expr2) will return 0 if the two expressions are NULL.
  3. NULLIF(expr1,expr2) will return NULL if the two expressions are equal.
  4. Expr1 can be NULL in NULLIF(expr1, expr2)

7. Which of the following is not a property of functions?
  1. Perform calculations on data
  2. Convert column data types
  3. Modify individual data items
  4. None of the above

8. What is the most appropriate about single row functions?
  1. They return no value
  2. They return one result per row and operate on all the rows of a table.
  3. They return one result per row with input arguments
  4. They return one result per set of rows and operate on multiple rows.

9. What is the number of arguments Single Row functions accept?
  1. 0
  2. Only 1
  3. Only 2
  4. 1 or more than 1

10. Which of the following is an exception to the return value of a DATE type single-row function?
  1. TO_DATE

11. What is true about the CONCAT function in Oracle DB?
  1. It can have only characters as input.
  2. It can have only 2 input parameters.
  3. It can have 2 or more input parameters
  4. It joins values by putting a white space in between the concatenated strings by default.

12. What is true about the SUBSTR function in Oracle DB?
  1. It extracts a string of determined length
  2. It shows the length of a string as a numeric value
  3. It finds the numeric position of a named character
  4. It trims characters from one (or both) sides from a character string

1-A,   2-D,   3-D,   4-D,  5-D,   6-C,   7-D,   8-B,   9-D,  10-C,   11-B,  12-A

function grpf() { var x = document.getElementById(‘myDIV1’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

Using the Group Functions Questions

1. Which of the following is NOT a GROUP BY function?
  1. MAX
  2. MIN
  3. NVL
  4. AVG

2. What are the appropriate data types accepted by GROUP BY functions?
  1. Nested Tables
  3. CLOB
  4. DATE

3. A table T_COUNT has 12 number values as 1, 2, 3, 32, 1, 1, null, 24, 12, null, 32, null. Predict the output of the below query.
SELECT COUNT (ALL num) FROM t_count;
  1. 12
  2. 6
  3. 9
  4. Throws exception because COUNT function doesn’t works with NULL values

4. Which of the following is NOT a GROUP BY extensions in SQL?
  3. CUBE

5. Which of the following statements is true about the group functions?
  1. The MIN function can be used only with numeric data.
  2. The MAX function can be used only with date values.
  3. The AVG function can be used only with numeric data.
  4. The SUM function canít be part of a nested function.

6. Which of the following functions is used to calculate the total value stored in a specified column?
  1. COUNT
  2. ADD
  3. TOTAL
  4. SUM

7. Which of the following functions can be used to include NULL values in calculations?
  1. SUM
  2. NVL
  3. MAX
  4. MIN

8. Determine the correct order of execution of following clauses in a SELECT statement.
  1. 2-3-4-5-1-6
  2. 1-2-3-4-5-6
  3. 6-5-4-3-2-1
  4. 5-4-2-3-1-6

9. What is true of using group functions on columns that contain NULL values?
  1. Group functions on columns ignore NULL values.
  2. Group functions on columns returning dates include NULL values.
  3. Group functions on columns returning numbers include NULL values.
  4. Group functions on columns cannot be accurately used on columns that contain NULL values.

10. Which of the following statements are true?
  1. AVG and SUM can be used only with numeric data types.
  2. STDDEV and VARIANCE can be used only with numeric data types.
  3. MAX can be used with LONG data type.
  4. MAX and MIN cannot be used with LOB or LONG data types.

11. Up to how many levels, the group functions can be nested?
  1. 1
  2. 2
  3. 3
  4. No limits

12. Which of the following are true about the CUBE extension of GROUP BY?
  1. Enables performing multiple GROUP BY clauses with a single query.
  2. Performs aggregations for all possible combinations of columns included.
  3. Performs increasing levels of cumulative subtotals, based on the provided column list.
  4. None of the above

1-C,   2-B,   3-C,   4-A,  5-C,   6-D,   7-B,   8-A,   9-A,  10-(A,B,D),   11-B,  12-B

function mtqq() { var x = document.getElementById(‘myDIV2’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

Get Data from Multiple Tables Questions

1.Which of the following is not related to a Relational Database?
  1. Selection
  2. Projection
  3. Joining
  4. None of the above

2.Which of following will be used to join rows with other tables if the column values fall in a range defined by inequality operators?
  1. Equijoin
  2. Simple join
  3. Non-equijoin
  4. None of the above

3.What is true about a cartesian join of two tables in Oracle DB?
  1. It must be avoided as it is costly and non optimized
  2. It is formed when every row from one table is joined with all rows in the second table
  3. Both A and B
  4. None of the above

4.What is the main condition for using joins between a source table and a target table in Oracle DB for getting a non-cartesian product result?
  1. There is no condition
  2. At least one of the columns in both the tables should be common.
  3. The names of the columns in both the joining tables should be the same for using joins
  4. None of the above

5.What is true about Natural joins in Oracle DB?
  1. The column names of the source and the target tables should be identical
  2. If the column names of the source and the target tables are not same, Oracle implicitly does the needful
  3. NATURAL JOINS, USING and ON are the keywords associated with Natural Joins
  4. All of the above

6. The database designer has named the key (unique) columns from two tables differently.While joining these tables, which among the following will be the best practice?
  1. JOIN..ON
  2. Either NATURAL JOIN or JOIN…ON clauses
  3. Both A and B
  4. None of the above

7. What are Cartesian Joins also known as in Oracle DB?
  1. Equi-join
  2. Anti-join
  3. Cross-Join
  4. None of the above

8.Which of the following is used to avoid the ambiguous column problem in Oracle DB?
  1. ;
  2. ,
  3. .
  4. /

9.How many tables can be joined by using the JOINS in Oracle DB?
  1. 1
  2. 2
  3. 255
  4. No limit

10.What is true about Non-equijoins in Oracle DB?
  1. They join based on the keyword NON-EQUI JOIN
  2. They are used using the JOIN..ON clause with “=” sign
  3. The results are obtained when the result of the inequality mentioned evaluates to true.
  4. None of the above

11.On which of the following conditions is a row returned when an EQUI-JOIN is used to join tables?
  1. The result of the inequality match operation is true
  2. The result of the inequality match operation is 0
  3. The result of the inequality match operation is 1
  4. The result of the inequality match operation is false

12.In what scenarios can we use Self-Joins ideally in Oracle DB?
  1. When we need to find the duplicate records in a table
  2. When we need to obtain NULL values from a table
  3. When we need to display a column of a table twice
  4. When we need to display hierarchy of relevant entities

1-D,   2-C,   3-B,   4-B,  5-C,   6-A,   7-C,   8-C,   9-D,  10-C,   11-A,  12-D

function sq() { var x = document.getElementById(‘myDIV3’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

Subqueries to Solve Queries Questions

1. Which of the following are the types of sub-queries?
  1. Ordered sub-queries
  2. Grouped sub-queries
  3. Single row sub-queries
  4. None of the above

2.Which of the following clause is mandatorily used in a sub-query?
  2. WHERE

3.In which of the following clauses can a sub-query be used?
  2. WHERE
  3. FROM
  4. All of the above

4.Which of the following single-row operators can be used for writing a sub-query?
  1. >=
  2. <
  3. =
  4. All of the above

5.What among the following is true about sub-queries?
  1. Sub-queries can be written on either side of a comparison operator
  2. Parenthesis is not mandatory for sub-queries
  3. Single-row sub-queries can use multi-row operators but vice versa is not possible
  4. All of the above

6.What among the following is true about single-row sub-queries?
  1. They return only one row
  2. They use single-row operators
  3. Both A and B
  4. None of the above

7.Which of the following are valid multi row operators used for sub-queries?
  1. <=
  2. ANY >=
  3. !=
  4. >=

8.What does the ANY operator evaluates to in the above query?
  1. TRUE
  2. FALSE
  3. NULL
  4. 0

9.What can be said about the < ANY operator in the query given above?
  1. It gives the maximum value of salary
  2. It gives the minimum value of salary
  3. It means it gives the values that are lesser than the highest
  4. None of the above

10.What will be the outcome of the above query (the option A in the question above), if the < ALL is replaced with the >ALL?
  1. It will execute successfully giving the same result.
  2. It will throw an ORA error
  3. It will execute successfully but give the employees’ details who have salaries lesser than all the employees with job_id ‘FI_ACCOUNTANT’.
  4. None of the above

11.What is true about sub-queries in general?
  1. Sub-queries have to be executed separately from the main queries
  2. Sub-queries can be executed at the will of the user, they are not related to the main query execution
  3. Sub-queries are equal to two sequential queries where the results of inner query are used by the main query
  4. All of the above

12. What should be the best practice to follow when we know what values we need to pass on to the main query in Oracle queries?
  1. Using GROUP BY
  2. Using sub-queries
  3. Using HAVING
  4. None of the above

13.What is the maximum number of nesting level allowed in an Inline View type sub-query?
  1. 255
  2. 300
  3. 216
  4. Unlimited

1-C,   2-A,   3-D,   4-D,  5-A,   6-C,   7-B,   8-A,   9-C,  10-C,   11-C,  12-D,   13-D

function sqq() { var x = document.getElementById(‘myDIV4’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

Using the Set Operators Questions

1.Which SET operator does the following figure indicate?
  1. UNION
  4. MINUS

2.Which SET operator does the following figure indicate?
  1. UNION
  4. MINUS

3.What is true about the UNION ALL operator?
  1. It returns rows from the combined queries along with NULL values
  2. It returns rows for the combined queries after eliminating duplicates
  3. It returns rows for the combined queries along with duplicate values
  4. It returns rows for the combined queries ignoring the NULL values

4.What is the precedence of the set operators UNION, UNION ALL, INTERSECT and MINUS?
  4. Equal precedence

5.What is the order of evaluation of set operators?
  1. Left to Right
  2. Right to Left
  3. Random Evaluation
  4. Top to Bottom

6.What among the following is true about SET operators?
  1. SET operators cannot be used in sub-queries
  2. SET operators can only be used in the WHERE clause
  3. ORDER BY can be used for all queries combined by a SET operator
  4. SET operators can be used in sub-queries

7.What is the best way to change the precedence of SET operators given the fact that they have equal precedence?
  1. The order of usage of the SET operators can be changed to change the precedence
  2. The equal precedence cannot be changed
  3. Parenthesis can be used to change the precedence
  4. None of the above

8.What will happen if the SELECT list of the compound queries returns both a VARCHAR2 and a NUMBER data type result?
  1. Oracle will convert them implicitly and return a VARCHAR2 data type result
  2. Oracle will convert them implicitly and return a NUMBER data type result
  3. An ORA error is thrown
  4. None of the above

9.What is true about the UNION operator?
  1. It eliminates the duplicate values ignoring NULL values
  2. It returns duplicate values ignoring NULL values
  3. It returns duplicate values including NULL values
  4. It eliminates duplicate values and does not ignore NULL values

10.What is true about the INTERSECT operator?
  1. The number of columns and data types of the columns in the component queries should be the same
  2. The names of the columns and data types of the columns in the component queries should be the same
  3. Both A and B
  4. None of the above

11.What can be said about the result set if the order of the intersected tables is altered when using INTERSECT?
  1. The result is altered
  2. The result remains the same
  3. The sorting changes on alteration
  4. None of the above

1-A,   2-C,   3-C,   4-D,  5-(A,D),   6-D,   7-C,   8-C,   9-D,  10-A,  11-B

function condi() { var x = document.getElementById(‘myDIV5’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

Learn Database Programming?