Forum

This topic contains 1 reply, has 1 voice, and was last updated by  arpita21 2 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3222 Reply

    arpita21
    Participant

    A. Count number of countries based on landmass.
    B. Count of countries with icon.
    C. Count of countries which have same top left and top right color in flag.
    D. Count number of countries based on zone.
    E. Sum of all circles present in all country flags.
    F. Count of countries which have both icon and text in flag.

    #3224 Reply

    arpita21
    Participant

    Remove double quotation

    [cloudera@localhost ~]$ sed s/\”//g ‘Load Data.csv’ > load1.csv;

    Load data to hdfs

    [cloudera@localhost ~]$ hadoop dfs -put ‘/Desktop/Load Data.csv’ /user/cloudera;

    create table
    create table country(name String,landmass int,zone int, area int,population int, language int,religion int,bars int,strips int,colours int,red int,green int,blue int,gold int,white int,black int,orrange int,mainhue String,circles int,crosses int,saltires int,quarters int,sunstars int,crescent int,triangle int,icon int,animate int,text int,topleft String,botright String)row format delimited fields terminated by ‘,’ stored as textfile;

    A. select count(name) from country group by landmass;

    31
    17
    35
    52
    39
    20

    B. select count(name) from country where icon == 1;

    C. select count(name) from country where topleft == botright;

    D. select count(name),zone from country group by zone;

    E. select sum(circles) from country;

    F. select count(name) from country where icon==1 AND text==1;

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Country Project
Your information:




cf22

Your Name (required)

Your Email (required)

Subject

Phone No

Your Message

Cart

  • No products in the cart.