chromium checkout and build error gclient error - chromium

Somehow the fetch and gclient is not valid.
zelong#zelong-ThinkPad-T430:~/chromium/src$ gclient sync --verbose
CIPD selfupdate failed. Trying to bootstrap the CIPD client from scratch...
curl: (7) Failed to connect to chrome-infra-packages.appspot.com port 443: Connection timed out
^C
depot_tools is in the path:
zelong#zelong-ThinkPad-T430:~/chromium/src$ echo $PATH
/home/zelong/bin:/home/zelong/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/media/zelong/2828a0f1-cc41-4428-854d-a7a18c59f5c6/Code/depot_tools:/media/zelong/2828a0f1-cc41-4428-854d-a7a18c59f5c6/fuchsia_source/fuchsia/.jiri_root/bin:/media/zelong/2828a0f1-cc41-4428-854d-a7a18c59f5c6/Opera/ofa/work/chromium/src/third_party/depot_tools/ninja
and fetch and gclient is in the path:
zelong#zelong-ThinkPad-T430:~/chromium/src$ ls -la /media/zelong/2828a0f1-cc41-4428-854d-a7a18c59f5c6/Code/depot_tools
total 19876
drwxrwxr-x 20 zelong zelong 12288 6月 27 16:54 .
drwxrwxr-x 23 zelong zelong 4096 11月 5 2019 ..
-rw-rw-r-- 1 zelong zelong 5069 1月 22 14:09 auth.py
-rwxrwxr-x 1 zelong zelong 1159 6月 27 15:28 autoninja
-rwxrwxr-x 1 zelong zelong 1470 1月 22 14:09 autoninja.bat
-rwxrwxr-x 1 zelong zelong 5829 6月 27 15:28 autoninja.py
-rwxrwxr-x 1 zelong zelong 320 10月 12 2019 bb
-rw-rw-r-- 1 zelong zelong 247 10月 12 2019 bb.bat
drwxrwxr-x 2 zelong zelong 4096 6月 27 15:28 bootstrap
drwxrwxr-x 6 zelong zelong 4096 1月 22 14:11 bootstrap-3.8.0.chromium.8_bin
-rw-rw-r-- 1 zelong zelong 982 6月 27 15:28 bootstrap_python3
-rw-rw-r-- 1 zelong zelong 485 10月 12 2019 breakpad.py
lrwxrwxrwx 1 zelong zelong 4 1月 22 14:09 cbuildbot -> cros
lrwxrwxrwx 1 zelong zelong 4 1月 22 14:09 chrome_set_ver -> cros
-rwxrwxr-x 1 zelong zelong 6623 6月 27 15:28 cipd
-rw-rw-r-- 1 zelong zelong 1815 6月 27 15:28 cipd.bat
drwxrwxr-x 5 zelong zelong 4096 1月 22 14:10 .cipd_bin
-rw-rw-r-- 1 zelong zelong 288 10月 12 2019 cipd_bin_setup.bat
-rw-rw-r-- 1 zelong zelong 611 10月 12 2019 cipd_bin_setup.sh
-rwx--x--x 1 zelong zelong 17131837 1月 22 14:10 .cipd_client
drwxrwxr-x 2 zelong zelong 4096 1月 22 14:10 .cipd_client_cache
-rw-rw-r-- 1 zelong zelong 54 6月 27 15:28 cipd_client_version
-rw-rw-r-- 1 zelong zelong 1513 6月 27 15:28 cipd_client_version.digests
-rw-rw-r-- 1 zelong zelong 4010 6月 27 15:28 .cipd_impl.ps1
-rw-rw-r-- 1 zelong zelong 2359 6月 27 15:28 cipd_manifest.txt
-rw-rw-r-- 1 zelong zelong 13043 6月 27 15:28 cipd_manifest.versions
-rwxrwxr-x 1 zelong zelong 275 10月 12 2019 cit
-rwxrwxr-x 1 zelong zelong 410 10月 12 2019 cit.bat
-rwxrwxr-x 1 zelong zelong 5071 10月 12 2019 cit.py
-rwxrwxr-x 1 zelong zelong 280 10月 12 2019 clang-format
-rw-rw-r-- 1 zelong zelong 415 10月 12 2019 clang-format.bat
-rwxrwxr-x 1 zelong zelong 293 10月 12 2019 clang_format_merge_driver
-rwxrwxr-x 1 zelong zelong 428 10月 12 2019 clang_format_merge_driver.bat
-rwxrwxr-x 1 zelong zelong 2457 10月 12 2019 clang_format_merge_driver.py
-rwxrwxr-x 1 zelong zelong 2657 10月 12 2019 clang_format.py
-rw-rw-r-- 1 zelong zelong 265 10月 12 2019 codereview.settings
-rwxrwxr-x 1 zelong zelong 298 10月 12 2019 compile_single_file
-rw-rw-r-- 1 zelong zelong 394 10月 12 2019 compile_single_file.bat
-rw-rw-r-- 1 zelong zelong 2732 10月 12 2019 compile_single_file.py
-rw-rw-r-- 1 zelong zelong 390 10月 12 2019 cpplint.bat
-rwxrwxr-x 1 zelong zelong 2394 10月 12 2019 cpplint_chromium.py
-rwxrwxr-x 1 zelong zelong 235287 6月 27 15:28 cpplint.py
-rwxrwxr-x 1 zelong zelong 2728 6月 27 15:28 cros
-rwxrwxr-x 1 zelong zelong 328 10月 12 2019 crosjobs
-rw-rw-r-- 1 zelong zelong 196 6月 27 15:28 CROS_OWNERS
lrwxrwxrwx 1 zelong zelong 4 1月 22 14:09 cros_sdk -> cros
-rwxrwxr-x 1 zelong zelong 1691 1月 22 14:09 detect_host_arch.py
-rwxrwxr-x 1 zelong zelong 300 10月 12 2019 download_from_google_storage
-rwxrwxr-x 1 zelong zelong 435 10月 12 2019 download_from_google_storage.bat
-rwxrwxr-x 1 zelong zelong 24189 6月 27 15:28 download_from_google_storage.py
-rwxrwxr-x 1 zelong zelong 1666 10月 12 2019 ensure_bootstrap
drwxrwxr-x 3 zelong zelong 4096 10月 12 2019 external_bin
-rwxrwxr-x 1 zelong zelong 768 6月 27 15:28 fetch
-rwxrwxr-x 1 zelong zelong 908 6月 27 15:28 fetch.bat
drwxrwxr-x 2 zelong zelong 4096 1月 22 14:09 fetch_configs
-rwxrwxr-x 1 zelong zelong 10340 6月 27 15:28 fetch.py
-rw-rw-r-- 1 zelong zelong 12462 6月 27 15:28 fix_encoding.py
-rwxrwxr-x 1 zelong zelong 1122 6月 27 15:28 gclient
-rwxrwxr-x 1 zelong zelong 1016 6月 27 15:28 gclient.bat
-rwxrwxr-x 1 zelong zelong 2322 10月 12 2019 gclient_completion.sh
-rw-rw-r-- 1 zelong zelong 31221 6月 27 15:28 gclient_eval.py
-rwxrwxr-x 1 zelong zelong 4179 10月 12 2019 gclient-new-workdir.py
-rw-rw-r-- 1 zelong zelong 5125 1月 22 14:09 gclient_paths.py
-rwxrwxr-x 1 zelong zelong 119569 6月 27 15:28 gclient.py
-rw-rw-r-- 1 zelong zelong 62487 6月 27 15:28 gclient_scm.py
-rw-rw-r-- 1 zelong zelong 40645 6月 27 15:28 gclient_utils.py
-rwxrwxr-x 1 zelong zelong 4865 6月 27 15:28 gerrit_client.py
-rw-rw-r-- 1 zelong zelong 34346 6月 27 15:28 gerrit_util.py
drwxrwxr-x 8 zelong zelong 4096 6月 27 16:31 .git
-rw-rw-r-- 1 zelong zelong 1528 10月 12 2019 .gitattributes
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-cache
-rwxrwxr-x 1 zelong zelong 28820 6月 27 15:28 git_cache.py
-rwxrwxr-x 1 zelong zelong 219 6月 27 15:28 git-cl
-rwxrwxr-x 1 zelong zelong 1313 6月 27 15:28 git_cl_completion.sh
-rwxrwxr-x 1 zelong zelong 192003 6月 27 15:28 git_cl.py
-rw-rw-r-- 1 zelong zelong 31344 6月 27 15:28 git_common.py
-rw-rw-r-- 1 zelong zelong 40415 10月 12 2019 git_common.pyc
-rwxrwxr-x 1 zelong zelong 1730 10月 12 2019 git-crrev-parse
-rw-rw-r-- 1 zelong zelong 1800 10月 12 2019 git_dates.py
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-drover
-rwxrwxr-x 1 zelong zelong 15763 6月 27 15:28 git_drover.py
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-find-releases
-rwxrwxr-x 1 zelong zelong 1976 6月 27 15:28 git_find_releases.py
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-footers
-rwxrwxr-x 1 zelong zelong 8567 6月 27 15:28 git_footers.py
-rwxrwxr-x 1 zelong zelong 256 6月 27 15:28 git-freeze
-rwxrwxr-x 1 zelong zelong 871 10月 12 2019 git_freezer.py
-rwxrwxr-x 1 zelong zelong 529 10月 12 2019 git-gs
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-hyper-blame
-rwxrwxr-x 1 zelong zelong 12524 6月 27 15:28 git_hyper_blame.py
-rw-rw-r-- 1 zelong zelong 1715 1月 22 14:09 .gitignore
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-map
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-map-branches
-rwxrwxr-x 1 zelong zelong 11294 6月 27 15:28 git_map_branches.py
-rwxrwxr-x 1 zelong zelong 4692 1月 22 14:09 git_map.py
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-mark-merge-base
-rwxrwxr-x 1 zelong zelong 2059 10月 12 2019 git_mark_merge_base.py
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-nav-downstream
-rwxrwxr-x 1 zelong zelong 1971 6月 27 15:28 git_nav_downstream.py
-rwxrwxr-x 1 zelong zelong 236 10月 12 2019 git-nav-upstream
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-new-branch
-rwxrwxr-x 1 zelong zelong 3071 6月 27 15:28 git_new_branch.py
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-number
-rwxrwxr-x 1 zelong zelong 9637 6月 27 15:28 git_number.py
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-rebase-update
-rwxrwxr-x 1 zelong zelong 12239 6月 27 15:28 git_rebase_update.py
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-rename-branch
-rwxrwxr-x 1 zelong zelong 1662 1月 22 14:09 git_rename_branch.py
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-reparent-branch
-rwxrwxr-x 1 zelong zelong 3229 10月 12 2019 git_reparent_branch.py
-rwxrwxr-x 1 zelong zelong 253 6月 27 15:28 git-retry
-rwxrwxr-x 1 zelong zelong 5795 10月 12 2019 git_retry.py
-rwxrwxr-x 1 zelong zelong 610 10月 12 2019 git-runhooks
-rwxrwxr-x 1 zelong zelong 215 6月 27 15:28 git-squash-branch
-rwxrwxr-x 1 zelong zelong 748 10月 12 2019 git_squash_branch.py
drwxrwxr-x 4 zelong zelong 4096 10月 12 2019 git-templates
-rwxrwxr-x 1 zelong zelong 504 6月 27 15:28 git-thaw
-rwxrwxr-x 1 zelong zelong 306 6月 27 15:28 git-upstream-diff
-rwxrwxr-x 1 zelong zelong 2044 10月 12 2019 git_upstream_diff.py
-rwxrwxr-x 1 zelong zelong 270 10月 12 2019 gn
-rw-rw-r-- 1 zelong zelong 405 10月 12 2019 gn.bat
-rwxrwxr-x 1 zelong zelong 2991 10月 12 2019 gn.py
-rwxrwxr-x 1 zelong zelong 363 1月 22 14:09 goma_auth
-rw-rw-r-- 1 zelong zelong 277 6月 27 15:28 goma_auth.bat
-rwxrwxr-x 1 zelong zelong 363 1月 22 14:09 goma_ctl
-rw-rw-r-- 1 zelong zelong 277 6月 27 15:28 goma_ctl.bat
-rw-rw-r-- 1 zelong zelong 173 6月 27 15:28 GOMA_OWNERS
-rwxrwxr-x 1 zelong zelong 5636 1月 22 14:09 gsutil.py
-rwxrwxr-x 1 zelong zelong 731 6月 27 15:28 gsutil.py.bat
-rw-rw-r-- 1 zelong zelong 2499 1月 22 14:09 gsutil.vpython
drwxrwxr-x 3 zelong zelong 4096 10月 12 2019 infra
-rwxrwxr-x 1 zelong zelong 321 10月 12 2019 led
-rw-rw-r-- 1 zelong zelong 255 10月 12 2019 led.bat
-rw-rw-r-- 1 zelong zelong 1563 10月 12 2019 LICENSE
-rw-rw-r-- 1 zelong zelong 3010 6月 27 15:28 lockfile.py
-rwxrwxr-x 1 zelong zelong 328 10月 12 2019 luci-auth
-rw-rw-r-- 1 zelong zelong 255 10月 12 2019 luci-auth.bat
-rwxrwxr-x 1 zelong zelong 325 10月 12 2019 lucicfg
-rw-rw-r-- 1 zelong zelong 259 10月 12 2019 lucicfg.bat
-rw-rw-r-- 1 zelong zelong 102 6月 27 15:28 LUCI_OWNERS
-rwxrwxr-x 1 zelong zelong 331 10月 12 2019 mac_toolchain
drwxrwxr-x 6 zelong zelong 4096 10月 12 2019 man
-rw-rw-r-- 1 zelong zelong 68 10月 12 2019 metrics.cfg
-rw-rw-r-- 1 zelong zelong 9425 6月 27 15:28 metrics.py
-rw-rw-r-- 1 zelong zelong 4526 1月 22 14:09 metrics.README.md
-rw-rw-r-- 1 zelong zelong 8811 10月 12 2019 metrics_utils.py
-rwxrwxr-x 1 zelong zelong 33598 6月 27 15:28 my_activity.py
-rwxrwxr-x 1 zelong zelong 1279 1月 22 14:09 ninja
-rwxrwxr-x 1 zelong zelong 504320 10月 12 2019 ninja.exe
-rwxrwxr-x 1 zelong zelong 161640 10月 12 2019 ninja-linux32
-rwxrwxr-x 1 zelong zelong 183344 10月 12 2019 ninja-linux64
-rw-rw-r-- 1 zelong zelong 1928 10月 12 2019 ninjalog.README.md
-rwxrwxr-x 1 zelong zelong 6620 6月 27 15:28 ninjalog_uploader.py
-rw-rw-r-- 1 zelong zelong 7201 10月 12 2019 ninjalog_uploader.pyc
-rwxrwxr-x 1 zelong zelong 3267 6月 27 15:28 ninjalog_uploader_wrapper.py
-rwxrwxr-x 1 zelong zelong 184804 10月 12 2019 ninja-mac
-rw-rw-r-- 1 zelong zelong 951 6月 27 15:28 OWNERS
-rw-rw-r-- 1 zelong zelong 12798 6月 27 15:28 owners_finder.py
-rw-rw-r-- 1 zelong zelong 23510 6月 27 15:28 owners.py
-rw-rw-r-- 1 zelong zelong 14820 6月 27 15:28 post_build_ninja_summary.py
-rw-rw-r-- 1 zelong zelong 60823 6月 27 15:28 presubmit_canned_checks.py
-rw-rw-r-- 1 zelong zelong 5146 6月 27 15:28 PRESUBMIT.py
-rwxrwxr-x 1 zelong zelong 66572 6月 27 15:28 presubmit_support.py
-rw-rw-r-- 1 zelong zelong 282 10月 12 2019 profile.xml
-rwxrwxr-x 1 zelong zelong 323 10月 12 2019 prpc
-rw-rw-r-- 1 zelong zelong 250 10月 12 2019 prpc.bat
-rwxrwxr-x 1 zelong zelong 302 10月 12 2019 pylint
-rwxrwxr-x 1 zelong zelong 1894 1月 22 14:09 pylint-1.5
-rwxrwxr-x 1 zelong zelong 1861 1月 22 14:09 pylint-1.6
-rwxrwxr-x 1 zelong zelong 1861 1月 22 14:09 pylint-1.7
-rwxrwxr-x 1 zelong zelong 1894 1月 22 14:09 pylint-1.8
-rwxrwxr-x 1 zelong zelong 1894 1月 22 14:09 pylint-1.9
-rw-rw-r-- 1 zelong zelong 411 10月 12 2019 pylint.bat
-rwxrwxr-x 1 zelong zelong 1276 10月 12 2019 pylint_main.py
-rw-rw-r-- 1 zelong zelong 9351 6月 27 15:28 pylintrc
-rwxr-xr-x 1 zelong zelong 42 1月 22 14:11 python3_bin_reldir.txt
drwxrwxr-x 2 zelong zelong 4096 1月 22 14:09 python-bin
-rwxr-xr-x 1 zelong zelong 41 1月 22 14:11 python_bin_reldir.txt
-rwxrwxr-x 1 zelong zelong 2154 6月 27 15:28 python_runner.sh
-rwxrwxr-x 1 zelong zelong 321 6月 27 15:28 rdb
-rw-rw-r-- 1 zelong zelong 248 6月 27 15:28 rdb.bat
-rw-rw-r-- 1 zelong zelong 3579 10月 12 2019 README.gclient.md
-rw-rw-r-- 1 zelong zelong 4241 10月 12 2019 README.git-cl.md
-rw-rw-r-- 1 zelong zelong 2867 6月 27 15:28 README.md
drwxrwxr-x 4 zelong zelong 4096 6月 27 15:28 recipes
-rwxrwxr-x 1 zelong zelong 39141 6月 27 15:28 repo
-rwxrwxr-x 1 zelong zelong 783 6月 27 15:28 roll-dep
-rwxrwxr-x 1 zelong zelong 700 6月 27 15:28 roll-dep.bat
-rwxrwxr-x 1 zelong zelong 10246 6月 27 15:28 roll_dep.py
-rw-rw-r-- 1 zelong zelong 14148 6月 27 15:28 scm.py
-rw-rw-r-- 1 zelong zelong 4604 10月 12 2019 setup_color.py
-rw-rw-r-- 1 zelong zelong 3422 10月 12 2019 setup_color.pyc
-rw-rw-r-- 1 zelong zelong 9357 6月 27 15:28 split_cl.py
-rw-rw-r-- 1 zelong zelong 65 1月 22 14:09 .style.yapf
-rw-rw-r-- 1 zelong zelong 8998 6月 27 15:28 subcommand.py
-rw-rw-r-- 1 zelong zelong 8020 6月 27 15:28 subprocess2.py
-rw-rw-r-- 1 zelong zelong 8487 10月 12 2019 subprocess2.pyc
drwxrwxr-x 2 zelong zelong 4096 6月 27 15:28 testing_support
drwxrwxr-x 3 zelong zelong 4096 6月 27 15:28 tests
drwxrwxr-x 9 zelong zelong 4096 1月 22 14:09 third_party
-rw------- 1 zelong zelong 0 6月 27 16:54 tmp.4pSSSQ0EwS
-rwxrwxr-x 1 zelong zelong 3865 6月 27 15:28 update_depot_tools
-rw-rw-r-- 1 zelong zelong 2055 6月 27 15:28 update_depot_tools.bat
-rw-rw-r-- 1 zelong zelong 1112 10月 12 2019 update_depot_tools_toggle.py
-rw-rw-r-- 1 zelong zelong 604 10月 12 2019 upload_metrics.py
-rwxrwxr-x 1 zelong zelong 10789 1月 22 14:09 upload_to_google_storage.py
drwxrwxr-x 2 zelong zelong 4096 1月 22 14:10 .versions
-rwxrwxr-x 1 zelong zelong 1000 1月 22 14:09 vpython
-rw-rw-r-- 1 zelong zelong 1187 1月 22 14:09 .vpython
-rwxrwxr-x 1 zelong zelong 1577 6月 27 15:28 vpython3
-rw-rw-r-- 1 zelong zelong 438 1月 22 14:09 .vpython3
-rw-rw-r-- 1 zelong zelong 603 6月 27 15:28 vpython3.bat
-rw-rw-r-- 1 zelong zelong 299 1月 22 14:09 vpython.bat
-rwxrwxr-x 1 zelong zelong 534 6月 27 15:28 WATCHLISTS
-rwxrwxr-x 1 zelong zelong 4411 1月 22 14:09 watchlists.py
-rwxrwxr-x 1 zelong zelong 1621 10月 12 2019 weekly
-rw-rw-r-- 1 zelong zelong 2231 6月 27 15:28 win32imports.py
drwxrwxr-x 2 zelong zelong 4096 6月 27 15:28 win_toolchain
-rwxrwxr-x 1 zelong zelong 2151 10月 12 2019 wtf
-rwxrwxr-x 1 zelong zelong 366 6月 27 15:28 yapf
-rwxrwxr-x 1 zelong zelong 409 10月 12 2019 yapf.bat
drwxrwxr-x 2 zelong zelong 4096 10月 12 2019 zsh-goodies
It may be related to cipd
zelong#zelong-ThinkPad-T430:~/chromium$ ls -la
total 92
drwxrwxr-x 4 zelong zelong 4096 6月 27 15:24 .
drwxr-xr-x 39 zelong zelong 4096 6月 27 16:02 ..
drwxrwxr-x 4 zelong zelong 4096 3月 11 15:03 .cipd
-rw-rw-r-- 1 zelong zelong 201 1月 22 14:11 .gclient
-rw-rw-r-- 1 zelong zelong 72997 1月 22 18:32 .gclient_entries
drwxrwxr-x 57 zelong zelong 4096 6月 27 15:21 src
How to fix it?

Try run step by step
https://github.com/anticrisis/docker-chromium-builder/blob/master/Dockerfile
may by your firewall blocked some http requests

Related

How to split one column to multiple

so my question is
run a query and get my result like this
WEEKS PRODUCT SELL
Week-1 Product-A 34
Week-1 Product-B 40
Week-1 Product-C 38
Week-1 Product-D 20
Week-2 Product-A 27
Week-2 Product-B 25
Week-2 Product-C 22
Week-2 Product-D 39
Week-3 Product-A 33
Week-3 Product-B 19
Week-3 Product-C 43
Week-3 Product-D 36
Week-4 Product-A 21
Week-4 Product-B 26
Week-4 Product-C 33
Week-4 Product-D 39
Week-5 Product-A 43
Week-5 Product-B 30
Week-5 Product-C 40
Week-5 Product-D 24
Week-6 Product-A 42
Week-6 Product-B 25
Week-6 Product-C 44
Week-6 Product-D 22
Week-7 Product-A 47
Week-7 Product-B 39
Week-7 Product-C 27
Week-7 Product-D 17
Week-8 Product-A 39
Week-8 Product-B 39
Week-8 Product-C 44
Week-8 Product-D 44
Week-9 Product-A 44
Week-9 Product-B 21
Week-9 Product-C 31
Week-9 Product-D 26
Week-10 Product-A 42
Week-10 Product-B 31
Week-10 Product-C 20
Week-10 Product-D 25
Week-11 Product-A 24
Week-11 Product-B 35
Week-11 Product-C 28
Week-11 Product-D 28
Week-12 Product-A 30
Week-12 Product-B 27
Week-12 Product-C 43
Week-12 Product-D 24
but i want my result like this
Week-1 Product-A 34 Product-B 40 Product-C 38 Product-D 20
Week-2 Product-A 27 Product-B 25 Product-C 22 Product-D 39
Week-3 Product-A 33 Product-B 19 Product-C 43 Product-D 36
Week-4 Product-A 21 Product-B 26 Product-C 33 Product-D 39
Week-5 Product-A 43 Product-B 30 Product-C 40 Product-D 24
Week-6 Product-A 42 Product-B 25 Product-C 44 Product-D 22
Week-7 Product-A 47 Product-B 39 Product-C 27 Product-D 17
Week-8 Product-A 39 Product-B 39 Product-C 44 Product-D 44
Week-9 Product-A 44 Product-B 21 Product-C 31 Product-D 26
Week-10 Product-A 42 Product-B 31 Product-C 20 Product-D 25
Week-11 Product-A 24 Product-B 35 Product-C 28 Product-D 28
Week-12 Product-A 30 Product-B 27 Product-C 43 Product-D 24
can i get my result like this
thank you
You can use conditional aggregation:
select weeks,
sum(case when product = 'Product-A' then sell end) as sell_a,
sum(case when product = 'Product-B' then sell end) as sell_b,
sum(case when product = 'Product-C' then sell end) as sell_c,
sum(case when product = 'Product-D' then sell end) as sell_d
from t
group by weeks
order by weeks;

how to fix Homebrew permissions? (extra tough case)

I'm trying to fix my permissions for OSX Homebrew, but I'm still getting
Error: Permission denied - /usr/local/opt
Here's what I've tried so far.
I followed the instructions at How to fix homebrew permissions? which suggests doing this:
sudo chown -R "$USER":admin /usr/local
sudo chown -R "$USER":admin /Library/Caches/Homebrew
sudo chown -R $USER:admin /Library/Caches/Homebrew
From https://superuser.com/questions/254843/cant-install-brew-formulae-correctly-permission-denied-in-usr-local-lib, I also tried this:
sudo chown -R `whoami` /usr/local
And I also ran this Ruby script: https://gist.github.com/rpavlik/768518 like this:
ruby -e "$(curl -fsSL https://gist.github.com/raw/768518/fix_homebrew.rb)
And from http://mascarenhas.us/blog/2013/05/25/osx-tip-fix-permissions-issue-during-homebrew-update/, I did this:
sudo chgrp -R admin /usr/local
sudo chmod -R g+w /usr/local
But no matter what I do, when I try to run
MacBookPro:~ pjs$ brew link youtube-dl
I get
Error: Permission denied - /usr/local/opt
Same thing for linking any other formula.
Here are my permissions for /usr/local:
MacBookPro: /usr/local pjs$ ls -lah
total 104
drwxrwxr-x 26 pjs admin 884B Aug 11 10:34 .
drwxr-xr-x# 13 root wheel 442B Jul 21 17:12 ..
drwxrwxr-x 13 pjs admin 442B Aug 26 13:42 .git
-rw-rw-r-- 1 pjs admin 448B Aug 11 10:34 .gitignore
-rw-rw-r-- 1 pjs admin 296B Jul 30 15:45 .yardopts
-rw-rw-r-- 1 pjs admin 3.1K May 15 15:52 CODEOFCONDUCT.md
-rw-rw-r-- 1 pjs admin 1.1K Oct 30 2014 CONTRIBUTING.md
drwxrwxr-x 96 pjs admin 3.2K Aug 18 13:20 Cellar
drwxrwxr-x 3 pjs admin 102B Jul 17 04:17 Frameworks
-rw-rw-r-- 1 pjs admin 1.2K Jan 20 2015 LICENSE.txt
d-wx-wx-wx 11 pjs admin 374B Aug 25 23:37 Library
d-wx-wx-wx 3 pjs admin 102B Feb 1 2015 Qt
-rw-rw-r-- 1 pjs admin 2.3K Aug 3 01:26 README.md
-rw-rw-r-- 1 pjs admin 23K May 15 15:52 SUPPORTERS.md
drwxrwxr-x 454 pjs admin 15K Aug 26 13:42 bin
d-wx-wx-wx 17 pjs admin 578B Aug 6 01:03 etc
d-wx-wx-wx 9 pjs admin 306B Feb 1 2015 git
d-wx-wx-wx 98 pjs admin 3.3K Aug 25 23:36 include
d-wx-wx-wx 276 pjs admin 9.2K Aug 25 23:36 lib
d-wx-wx-wx 4 pjs admin 136B Feb 1 2015 libexec
d-wx-wx-wx 98 pjs admin 3.3K Aug 26 13:42 opt
--wx-wx-wx 1 pjs admin 88B May 6 2013 prince
drwxrwxr-x 4 pjs admin 136B Aug 6 01:03 sbin
d-wx-wx-wx 42 pjs admin 1.4K Aug 26 13:42 share
d-wx-wx-wx 5 pjs admin 170B Jul 21 17:43 texlive
d-wx-wx-wx 6 pjs admin 204B Aug 6 01:03 var
And here are my permissions for /usr/local/opt:
MacBookPro: /usr/local/opt pjs$ ls -lah
total 768
d-wx-wx-wx 98 pjs admin 3.3K Aug 26 13:42 .
drwxrwxr-x 26 pjs admin 884B Aug 11 10:34 ..
lrwxr-xr-x 1 pjs admin 25B May 16 2014 aspell -> ../Cellar/aspell/0.60.6.1
lrwxr-xr-x 1 pjs admin 23B Aug 5 22:25 autoconf -> ../Cellar/autoconf/2.69
lrwxr-xr-x 1 pjs admin 25B May 3 2014 autojump -> ../Cellar/autojump/21.6.9
lrwxr-xr-x 1 pjs admin 23B Aug 5 22:25 automake -> ../Cellar/automake/1.15
lrwxr-xr-x 1 pjs admin 22B Jun 23 17:41 bdw-gc -> ../Cellar/bdw-gc/7.4.2
lrwxr-xr-x 1 pjs admin 28B Aug 19 01:34 berkeley-db -> ../Cellar/berkeley-db/6.1.26
lrwxr-xr-x 1 pjs admin 26B Aug 4 11:30 brew-cask -> ../Cellar/brew-cask/0.56.0
lrwxr-xr-x 1 pjs admin 22B Aug 4 11:30 cask -> ../Cellar/cask/0.7.2_1
lrwxr-xr-x 1 pjs admin 21B Aug 19 01:50 cmake -> ../Cellar/cmake/3.3.1
lrwxr-xr-x 1 pjs admin 22B Sep 27 2014 cmatrix -> ../Cellar/cmatrix/1.2a
lrwxr-xr-x 1 pjs admin 20B Jul 20 00:31 cmus -> ../Cellar/cmus/2.7.1
lrwxr-xr-x 1 pjs admin 22B Aug 25 23:25 d-bus -> ../Cellar/d-bus/1.8.20
lrwxr-xr-x 1 pjs admin 21B Jul 31 20:59 dict -> ../Cellar/dict/1.12.1
lrwxr-xr-x 1 pjs admin 24B Aug 6 01:03 dovecot -> ../Cellar/dovecot/2.2.18
lrwxr-xr-x 1 pjs admin 20B Aug 10 16:59 emacs -> ../Cellar/emacs/24.5
lrwxr-xr-x 1 pjs admin 19B Aug 21 2014 faac -> ../Cellar/faac/1.28
lrwxr-xr-x 1 pjs admin 19B May 16 2014 faad2 -> ../Cellar/faad2/2.7
lrwxr-xr-x 1 pjs admin 20B Jul 1 23:50 fasd -> ../Cellar/fasd/1.0.1
lrwxr-xr-x 1 pjs admin 24B Aug 18 09:59 ffmpeg -> ../Cellar/ffmpeg/2.7.2_1
lrwxr-xr-x 1 pjs admin 20B Dec 18 2014 flac -> ../Cellar/flac/1.3.1
lrwxr-xr-x 1 pjs admin 27B May 9 2014 fontconfig -> ../Cellar/fontconfig/2.11.0
lrwxr-xr-x 1 pjs admin 24B Jul 17 04:44 freetype -> ../Cellar/freetype/2.6_1
lrwxr-xr-x 1 pjs admin 19B Oct 30 2014 gdbm -> ../Cellar/gdbm/1.11
lrwxr-xr-x 1 pjs admin 26B Jul 21 01:40 gettext -> ../Cellar/gettext/0.19.5.1
lrwxr-xr-x 1 pjs admin 21B Jul 31 22:30 glib -> ../Cellar/glib/2.44.1
lrwxr-xr-x 1 pjs admin 22B Aug 5 22:25 gmime -> ../Cellar/gmime/2.6.20
lrwxr-xr-x 1 pjs admin 20B May 16 2014 gmp -> ../Cellar/gmp/6.0.0a
lrwxr-xr-x 1 pjs admin 26B May 17 06:13 gnu-typist -> ../Cellar/gnu-typist/2.9.5
lrwxr-xr-x 1 pjs admin 22B Aug 18 13:20 gnupg -> ../Cellar/gnupg/1.4.19
lrwxr-xr-x 1 pjs admin 25B Aug 18 09:59 gnutls -> ../Cellar/gnutls/3.3.17.1
lrwxr-xr-x 1 pjs admin 26B Aug 6 03:27 html2text -> ../Cellar/html2text/1.3.2a
lrwxr-xr-x 1 pjs admin 24B Jul 17 04:31 hunspell -> ../Cellar/hunspell/1.3.3
lrwxr-xr-x 1 pjs admin 20B May 17 06:19 icu4c -> ../Cellar/icu4c/55.1
lrwxr-xr-x 1 pjs admin 30B Jul 28 16:12 imagemagick -> ../Cellar/imagemagick/6.9.1-10
lrwxr-xr-x 1 pjs admin 21B Aug 26 00:35 isync -> ../Cellar/isync/1.2.0
lrwxr-xr-x 1 pjs admin 21B Dec 18 2014 jansson -> ../Cellar/jansson/2.7
lrwxr-xr-x 1 pjs admin 17B Jul 17 04:44 jpeg -> ../Cellar/jpeg/8d
lrwxr-xr-x 1 pjs admin 21B Jan 20 2015 json-c -> ../Cellar/json-c/0.12
lrwxr-xr-x 1 pjs admin 21B May 16 2014 lame -> ../Cellar/lame/3.99.5
lrwxr-xr-x 1 pjs admin 21B May 16 2014 libao -> ../Cellar/libao/1.2.0
lrwxr-xr-x 1 pjs admin 22B May 16 2014 libcue -> ../Cellar/libcue/1.4.0
lrwxr-xr-x 1 pjs admin 23B Jul 31 22:29 libffi -> ../Cellar/libffi/3.0.13
lrwxr-xr-x 1 pjs admin 27B Jul 28 16:12 libgcrypt -> ../Cellar/libgcrypt/1.6.3_1
lrwxr-xr-x 1 pjs admin 27B Apr 14 07:57 libgpg-error -> ../Cellar/libgpg-error/1.19
lrwxr-xr-x 1 pjs admin 22B Jul 31 20:58 libmaa -> ../Cellar/libmaa/1.3.2
lrwxr-xr-x 1 pjs admin 22B Aug 30 2014 libogg -> ../Cellar/libogg/1.3.2
lrwxr-xr-x 1 pjs admin 23B Jul 28 16:12 libpng -> ../Cellar/libpng/1.6.18
lrwxr-xr-x 1 pjs admin 22B May 17 06:13 libtasn1 -> ../Cellar/libtasn1/4.5
lrwxr-xr-x 1 pjs admin 23B Jul 17 04:44 libtiff -> ../Cellar/libtiff/4.0.4
lrwxr-xr-x 1 pjs admin 23B Jul 17 04:44 libtool -> ../Cellar/libtool/2.4.6
lrwxr-xr-x 1 pjs admin 28B Apr 14 07:57 libvo-aacenc -> ../Cellar/libvo-aacenc/0.1.3
lrwxr-xr-x 1 pjs admin 25B Apr 14 07:57 libvorbis -> ../Cellar/libvorbis/1.3.5
lrwxr-xr-x 1 pjs admin 22B Jul 13 23:43 libvpx -> ../Cellar/libvpx/1.4.0
lrwxr-xr-x 1 pjs admin 25B Jan 20 2015 libyaml -> ../Cellar/libyaml/0.1.6_1
lrwxr-xr-x 1 pjs admin 25B May 12 2014 lynx -> ../Cellar/lynx/2.8.8rel.2
lrwxr-xr-x 1 pjs admin 21B May 16 2014 mad -> ../Cellar/mad/0.15.1b
lrwxr-xr-x 1 pjs admin 26B Oct 18 2014 makedepend -> ../Cellar/makedepend/1.0.5
lrwxr-xr-x 1 pjs admin 23B Aug 2 03:05 mercurial -> ../Cellar/mercurial/3.5
lrwxr-xr-x 1 pjs admin 21B Jul 31 03:19 most -> ../Cellar/most/5.0.0a
lrwxr-xr-x 1 pjs admin 21B May 16 2014 mp4v2 -> ../Cellar/mp4v2/2.0.0
lrwxr-xr-x 1 pjs admin 21B Aug 5 22:26 msmtp -> ../Cellar/msmtp/1.6.2
lrwxr-xr-x 1 pjs admin 17B Aug 10 14:40 mu -> ../Cellar/mu/HEAD
lrwxr-xr-x 1 pjs admin 22B May 16 2014 nettle -> ../Cellar/nettle/2.7.1
lrwxr-xr-x 1 pjs admin 21B Jul 17 04:17 node -> ../Cellar/node/0.12.7
lrwxr-xr-x 1 pjs admin 24B Aug 6 02:35 notmuch -> ../Cellar/notmuch/0.20.2
lrwxr-xr-x 1 pjs admin 28B Aug 5 20:23 offline-imap -> ../Cellar/offline-imap/6.5.7
lrwxr-xr-x 1 pjs admin 26B Aug 5 22:27 openssl -> ../Cellar/openssl/1.0.2d_1
lrwxr-xr-x 1 pjs admin 25B Jul 20 23:38 pandoc -> ../Cellar/pandoc/1.13.2.1
lrwxr-xr-x 1 pjs admin 19B Jul 19 18:58 pcre -> ../Cellar/pcre/8.37
lrwxr-xr-x 1 pjs admin 21B Sep 25 2014 pdfjam -> ../Cellar/pdfjam/2.08
lrwxr-xr-x 1 pjs admin 21B Jul 31 20:55 perl -> ../Cellar/perl/5.22.0
lrwxr-xr-x 1 pjs admin 29B Oct 12 2014 pianobar -> ../Cellar/pianobar/2014.09.28
lrwxr-xr-x 1 pjs admin 25B May 16 2014 pkg-config -> ../Cellar/pkg-config/0.28
lrwxr-xr-x 1 pjs admin 25B Jul 17 04:17 python -> ../Cellar/python/2.7.10_2
lrwxr-xr-x 1 pjs admin 24B Oct 30 2014 readline -> ../Cellar/readline/6.3.8
lrwxr-xr-x 1 pjs admin 23B Jun 4 02:50 rmtrash -> ../Cellar/rmtrash/0.3.3
lrwxr-xr-x 1 pjs admin 20B Aug 20 12:51 ruby -> ../Cellar/ruby/2.2.3
lrwxr-xr-x 1 pjs admin 22B Jul 31 03:19 s-lang -> ../Cellar/s-lang/2.3.0
lrwxr-xr-x 1 pjs admin 30B Aug 11 10:34 screenbrightness -> ../Cellar/screenbrightness/1.2
lrwxr-xr-x 1 pjs admin 29B Jul 31 22:30 sdcv -> ../Cellar/sdcv/0.5-2013-09-10
lrwxr-xr-x 1 pjs admin 25B Aug 11 10:34 sqlite -> ../Cellar/sqlite/3.8.11.1
lrwxr-xr-x 1 pjs admin 27B May 3 2014 ssh-copy-id -> ../Cellar/ssh-copy-id/6.6p1
lrwxr-xr-x 1 pjs admin 23B Aug 13 01:46 surfraw -> ../Cellar/surfraw/2.2.9
lrwxr-xr-x 1 pjs admin 22B Aug 6 02:35 talloc -> ../Cellar/talloc/2.1.2
lrwxr-xr-x 1 pjs admin 24B Aug 21 2014 texi2html -> ../Cellar/texi2html/1.82
lrwxr-xr-x 1 pjs admin 36B Jul 19 18:58 the_silver_searcher -> ../Cellar/the_silver_searcher/0.30.0
lrwxr-xr-x 1 pjs admin 19B Jun 23 17:41 w3m -> ../Cellar/w3m/0.5.3
lrwxr-xr-x 1 pjs admin 21B Jul 18 2014 wdiff -> ../Cellar/wdiff/1.2.2
lrwxr-xr-x 1 pjs admin 21B Apr 14 07:57 wget -> ../Cellar/wget/1.16.3
lrwxr-xr-x 1 pjs admin 21B Jul 21 16:04 wordnet -> ../Cellar/wordnet/3.1
lrwxr-xr-x 1 pjs admin 20B Aug 18 09:56 x264 -> ../Cellar/x264/r2555
lrwxr-xr-x 1 pjs admin 23B Aug 5 22:25 xapian -> ../Cellar/xapian/1.2.19
lrwxr-xr-x 1 pjs admin 20B Jul 8 10:53 xvid -> ../Cellar/xvid/1.3.4
lrwxr-xr-x 1 pjs admin 18B Apr 14 07:57 xz -> ../Cellar/xz/5.2.1
lrwxr-xr-x 1 pjs admin 20B Aug 21 2014 yasm -> ../Cellar/yasm/1.3.0
lrwxr-xr-x 1 pjs admin 31B Aug 26 13:42 youtube-dl -> ../Cellar/youtube-dl/2015.08.23
How do I fix my Homebrew permissions?
For some reason, a bunch of Homebrew's directories, including /usr/local/opt, do not have read permission. I believe Homebrew requires read permission as well as write permission to these directories. Try running this to grant the owner and group read permission:
$ chmod -R a+r /usr/local

how to find duplicate values using row_number and partition by

I would like to know how to get all the duplicate values using the following query.please let me know what i am doing wrong with the query.
regards,
Iftekhar
SQL> desc tmp_emp_Area
Name Null? Type
------------------------------- -------- ----
SC_CD VARCHAR2(2)
DIST_CD VARCHAR2(2)
THA_CD VARCHAR2(2)
UN_CD VARCHAR2(3)
FP_ID VARCHAR2(4)
S_DT DATE
END_DT DATE
PERFORM VARCHAR2(1)
BS_CD VARCHAR2(4)
MKT_CD VARCHAR2(3)
Query :
SELECT SC_CD,DIST_CD,THA_CD,UN_CD,FP_ID,
row_number() over(partition BY SC_CD, DIST_CD, THA_CD, UN_CD, FP_ID order by FP_ID) rn
FROM tmp_emp_area
WHERE rn >1
SQL> / WHERE rn >1
* ERROR at line 4: ORA-00904: "RN": invalid identifier
Please check these two results below that i got after running two different queries to get duplicates.one is showing 92 columns and other is showing 96 columns.
select SC_CD,DIST_CD,THA_CD,UN_CD,FP_ID,count(fp_id)
from tmp_emp_area
group by SC_CD,DIST_CD,THA_CD,UN_CD,FP_ID
having count(fp_id)>1
/
SC DI TH UN_ FP_I COUNT(FP_ID)
-- -- -- --- ---- ------------
14 61 02 022 5J85 2
14 61 02 098 5J85 3
14 64 02 004 5J85 2
14 64 02 002 5J85 2
14 60 19 060 5F77 2
14 60 13 077 5F77 2
14 61 06 006 5D51 2
14 61 07 013 5D51 2
14 61 07 083 5D51 2
14 61 06 010 5D51 2
14 61 01 015 5R44 2
14 61 08 027 5R44 2
14 61 01 057 5R44 2
14 61 01 067 5R44 2
14 61 05 001 5R44 2
14 61 05 003 5R44 2
14 61 02 009 5J85 2
14 60 13 078 5F77 2
14 61 06 007 5D51 2
14 61 01 021 5R44 2
14 61 01 029 5R44 2
SC DI TH UN_ FP_I COUNT(FP_ID)
-- -- -- --- ---- ------------
14 61 01 065 5R44 2
14 61 01 069 5R44 2
14 64 03 013 5J85 2
14 61 02 014 5J85 2
14 61 02 089 5J85 2
14 60 19 132 5F77 2
14 60 19 134 5F77 2
14 61 07 086 5D51 2
14 61 06 035 5D51 2
14 61 06 014 5D51 2
14 61 01 031 5R44 2
14 61 01 036 5R44 2
14 61 01 041 5R44 2
14 61 02 092 5J85 3
14 61 02 074 5J85 3
14 61 02 088 5J85 2
14 61 02 109 5J85 2
14 60 19 014 5F77 2
14 61 07 015 5D51 2
14 61 06 008 5D51 2
14 61 06 016 5D51 2
SC DI TH UN_ FP_I COUNT(FP_ID)
-- -- -- --- ---- ------------
14 61 05 047 5R44 2
14 61 01 018 5R44 2
14 61 01 055 5R44 2
14 61 01 066 5R44 2
14 61 01 024 5R44 2
14 61 02 093 5J85 3
14 64 02 011 5J85 2
14 64 02 003 5J85 2
14 61 09 002 5J85 2
14 61 02 081 5J85 2
14 61 05 053 5D51 2
14 61 07 087 5D51 2
14 61 06 036 5D51 2
14 61 06 020 5D51 2
14 61 01 076 5R44 2
14 61 02 059 5R44 2
14 61 02 033 5J85 2
14 64 02 008 5J85 2
14 64 02 020 5J85 2
14 61 02 097 5J85 2
14 61 02 017 5J85 2
SC DI TH UN_ FP_I COUNT(FP_ID)
-- -- -- --- ---- ------------
14 61 02 082 5J85 2
14 61 01 077 5R44 2
14 61 05 046 5R44 2
14 61 01 017 5R44 2
14 61 01 054 5R44 2
14 64 02 030 5J85 2
14 61 02 010 5J85 2
14 61 02 103 5J85 2
14 64 02 006 5J85 2
14 64 03 020 5J85 2
14 61 02 105 5J85 2
14 61 02 080 5J85 2
14 61 02 151 5J85 2
14 60 19 059 5F77 2
14 61 06 045 5D51 2
14 61 01 075 5R44 2
14 61 01 056 5R44 2
14 61 01 020 5R44 2
14 61 05 007 5R44 2
14 61 01 053 5R44 2
14 61 01 078 5R44 2
SC DI TH UN_ FP_I COUNT(FP_ID)
-- -- -- --- ---- ------------
14 61 02 013 5J85 2
14 64 02 010 5J85 2
14 64 02 001 5J85 2
14 61 02 077 5J85 2
14 61 07 033 5D51 2
14 61 01 033 5R44 2
14 61 01 068 5R44 2
14 61 01 073 5R44 2
92 rows selected.
select *
from
(
SELECT SC_CD,DIST_CD,THA_CD,UN_CD,FP_ID,
row_number() over(partition BY SC_CD, DIST_CD, THA_CD, UN_CD, FP_ID order by FP_ID) rn
FROM tmp_emp_area
) dt
WHERE rn >1
SQL> /
SC DI TH UN_ FP_I RN
-- -- -- --- ---- ---------
14 60 13 077 5F77 2
14 60 13 078 5F77 2
14 60 19 014 5F77 2
14 60 19 059 5F77 2
14 60 19 060 5F77 2
14 60 19 132 5F77 2
14 60 19 134 5F77 2
14 61 01 015 5R44 2
14 61 01 017 5R44 2
14 61 01 018 5R44 2
14 61 01 020 5R44 2
14 61 01 021 5R44 2
14 61 01 024 5R44 2
14 61 01 029 5R44 2
14 61 01 031 5R44 2
14 61 01 033 5R44 2
14 61 01 036 5R44 2
14 61 01 041 5R44 2
14 61 01 053 5R44 2
14 61 01 054 5R44 2
14 61 01 055 5R44 2
SC DI TH UN_ FP_I RN
-- -- -- --- ---- ---------
14 61 01 056 5R44 2
14 61 01 057 5R44 2
14 61 01 065 5R44 2
14 61 01 066 5R44 2
14 61 01 067 5R44 2
14 61 01 068 5R44 2
14 61 01 069 5R44 2
14 61 01 073 5R44 2
14 61 01 075 5R44 2
14 61 01 076 5R44 2
14 61 01 077 5R44 2
14 61 01 078 5R44 2
14 61 02 009 5J85 2
14 61 02 010 5J85 2
14 61 02 013 5J85 2
14 61 02 014 5J85 2
14 61 02 017 5J85 2
14 61 02 022 5J85 2
14 61 02 033 5J85 2
14 61 02 059 5R44 2
14 61 02 074 5J85 2
SC DI TH UN_ FP_I RN
-- -- -- --- ---- ---------
14 61 02 074 5J85 3
14 61 02 077 5J85 2
14 61 02 080 5J85 2
14 61 02 081 5J85 2
14 61 02 082 5J85 2
14 61 02 088 5J85 2
14 61 02 089 5J85 2
14 61 02 092 5J85 2
14 61 02 092 5J85 3
14 61 02 093 5J85 2
14 61 02 093 5J85 3
14 61 02 097 5J85 2
14 61 02 098 5J85 2
14 61 02 098 5J85 3
14 61 02 103 5J85 2
14 61 02 105 5J85 2
14 61 02 109 5J85 2
14 61 02 151 5J85 2
14 61 05 001 5R44 2
14 61 05 003 5R44 2
14 61 05 007 5R44 2
SC DI TH UN_ FP_I RN
-- -- -- --- ---- ---------
14 61 05 046 5R44 2
14 61 05 047 5R44 2
14 61 05 053 5D51 2
14 61 06 006 5D51 2
14 61 06 007 5D51 2
14 61 06 008 5D51 2
14 61 06 010 5D51 2
14 61 06 014 5D51 2
14 61 06 016 5D51 2
14 61 06 020 5D51 2
14 61 06 035 5D51 2
14 61 06 036 5D51 2
14 61 06 045 5D51 2
14 61 07 013 5D51 2
14 61 07 015 5D51 2
14 61 07 033 5D51 2
14 61 07 083 5D51 2
14 61 07 086 5D51 2
14 61 07 087 5D51 2
14 61 08 027 5R44 2
14 61 09 002 5J85 2
SC DI TH UN_ FP_I RN
-- -- -- --- ---- ---------
14 64 02 001 5J85 2
14 64 02 002 5J85 2
14 64 02 003 5J85 2
14 64 02 004 5J85 2
14 64 02 006 5J85 2
14 64 02 008 5J85 2
14 64 02 010 5J85 2
14 64 02 011 5J85 2
14 64 02 020 5J85 2
14 64 02 030 5J85 2
14 64 03 013 5J85 2
14 64 03 020 5J85 2
96 rows selected.
You can't use an alias in WHERE, switch to a Derived Table:
select *
from
(
SELECT SC_CD,DIST_CD,THA_CD,UN_CD,FP_ID,
row_number() over(partition BY SC_CD, DIST_CD, THA_CD, UN_CD, FP_ID order by FP_ID) rn
FROM tmp_emp_area
) dt
WHERE rn >1

solr full index issue with records being deleted

I have a simple question, some of you may have already faced this problem.
When I restart tomcat while a full index is in progress I have seen all my records being deleted to 0 records. Is this work as design or is there any flag to disable this behavior.
This in turn affecting my slaves as they all replicate to 0 records.
Example
During DIH...
-rw-rw-r-- 1 solruser solruser 20 Nov 28 10:33 segments.gen
-rw-rw-r-- 1 solruser solruser 253 Nov 28 10:33 segments_3
-rw-rw-r-- 1 solruser solruser 1132805 Nov 28 10:33 _8g.tis
-rw-rw-r-- 1 solruser solruser 14526 Nov 28 10:33 _8g.tii
-rw-rw-r-- 1 solruser solruser 4739 Nov 28 10:33 _8g.prx
-rw-rw-r-- 1 solruser solruser 4743 Nov 28 10:33 _8g.nrm
-rw-rw-r-- 1 solruser solruser 676716 Nov 28 10:33 _8g.frq
-rw-rw-r-- 1 solruser solruser 1472 Nov 28 10:33 _8g.fnm
-rw-rw-r-- 1 solruser solruser 37916 Nov 28 10:33 _8g.fdx
-rw-rw-r-- 1 solruser solruser 11152040 Nov 28 10:33 _8g.fdt
-rw-rw-r-- 1 solruser solruser 0 Nov 28 10:34 write.lock
-rw-rw-r-- 1 solruser solruser 132932 Nov 28 10:36 _8h.fdx
-rw-rw-r-- 1 solruser solruser 39506829 Nov 28 10:36 _8h.fdt
-rw-rw-r-- 1 solruser solruser 4157436 Nov 28 10:36 _8h.tis
-rw-rw-r-- 1 solruser solruser 48924 Nov 28 10:36 _8h.tii
-rw-rw-r-- 1 solruser solruser 16616 Nov 28 10:36 _8h.prx
-rw-rw-r-- 1 solruser solruser 16620 Nov 28 10:36 _8h.nrm
-rw-rw-r-- 1 solruser solruser 2523173 Nov 28 10:36 _8h.frq
-rw-rw-r-- 1 solruser solruser 1472 Nov 28 10:36 _8h.fnm
-rw-rw-r-- 1 solruser solruser 36 Nov 28 10:36 _8h_1.del
-rw-rw-r-- 1 solruser solruser 0 Nov 28 10:36 _8i.fdx
-rw-rw-r-- 1 solruser solruser 3227648 Nov 28 10:36 _8i.fdt
After stopping the server
total 69884
-rw-rw-r-- 1 solruser solruser 132932 Nov 28 10:36 _8h.fdx
-rw-rw-r-- 1 solruser solruser 39506829 Nov 28 10:36 _8h.fdt
-rw-rw-r-- 1 solruser solruser 4157436 Nov 28 10:36 _8h.tis
-rw-rw-r-- 1 solruser solruser 48924 Nov 28 10:36 _8h.tii
-rw-rw-r-- 1 solruser solruser 16616 Nov 28 10:36 _8h.prx
-rw-rw-r-- 1 solruser solruser 16620 Nov 28 10:36 _8h.nrm
-rw-rw-r-- 1 solruser solruser 2523173 Nov 28 10:36 _8h.frq
-rw-rw-r-- 1 solruser solruser 1472 Nov 28 10:36 _8h.fnm
-rw-rw-r-- 1 solruser solruser 36 Nov 28 10:36 _8h_1.del
-rw-rw-r-- 1 solruser solruser 71892 Nov 28 10:36 _8i.fdx
-rw-rw-r-- 1 solruser solruser 21082644 Nov 28 10:36 _8i.fdt
-rw-rw-r-- 1 solruser solruser 0 Nov 28 10:36 write.lock
-rw-rw-r-- 1 solruser solruser 20 Nov 28 10:36 segments.gen
-rw-rw-r-- 1 solruser solruser 474 Nov 28 10:36 segments_4
-rw-rw-r-- 1 solruser solruser 0 Nov 28 10:36 _8j.fdx
-rw-rw-r-- 1 solruser solruser 49152 Nov 28 10:36 _8j.fdt
-rw-rw-r-- 1 solruser solruser 2443628 Nov 28 10:36 _8i.tis
-rw-rw-r-- 1 solruser solruser 27664 Nov 28 10:36 _8i.tii
-rw-rw-r-- 1 solruser solruser 8986 Nov 28 10:36 _8i.prx
-rw-rw-r-- 1 solruser solruser 8990 Nov 28 10:36 _8i.nrm
-rw-rw-r-- 1 solruser solruser 1314275 Nov 28 10:36 _8i.frq
-rw-rw-r-- 1 solruser solruser 1472 Nov 28 10:36 _8i.fnm
/sr

Apache getting denied access to a directory on my local server

I have OS X 10.5 with about 40 websites in the Sites directory. I just downloaded one from my server to initialize a local copy but I am getting denied access. The permissions seem fine but Apache is still giving me the 403. Any ideas why this would happen? Does it have to do with me downloading the files from the internet?
drwxr-xr-x 30 TAmoyal TAmoyal 1020 Jul 17 19:45 ./
drwxr-xr-x+ 55 TAmoyal TAmoyal 1870 Jul 17 19:45 ../
-rw-r--r--# 1 TAmoyal TAmoyal 170 Jul 6 02:40 .htaccess
-rw-r--r-- 1 TAmoyal TAmoyal 397 Jul 2 19:08 index.php
-rw-r--r-- 1 TAmoyal TAmoyal 15129 Jul 2 19:08 license.txt
-rw-r--r-- 1 TAmoyal TAmoyal 7638 Jul 2 19:08 readme.html
drwxr-xr-x 89 TAmoyal TAmoyal 3026 Jul 17 16:24 wp-admin/
-rw-r--r-- 1 TAmoyal TAmoyal 40543 Jul 2 19:10 wp-app.php
-rw-r--r-- 1 TAmoyal TAmoyal 220 Jul 2 19:10 wp-atom.php
-rw-r--r-- 1 TAmoyal TAmoyal 274 Jul 2 19:10 wp-blog-header.php
-rw-r--r-- 1 TAmoyal TAmoyal 3649 Jul 2 19:10 wp-comments-post.php
-rw-r--r-- 1 TAmoyal TAmoyal 238 Jul 2 19:10 wp-commentsrss2.php
-rw-r--r-- 1 TAmoyal TAmoyal 2550 Jul 2 19:10 wp-config-sample.php
-rw-r--r--# 1 TAmoyal TAmoyal 2458 Jul 17 16:41 wp-config.php
drwxr-xr-x 5 TAmoyal TAmoyal 170 Jul 17 16:25 wp-content/
-rw-r--r-- 1 TAmoyal TAmoyal 1254 Jul 2 19:11 wp-cron.php
-rw-r--r-- 1 TAmoyal TAmoyal 220 Jul 2 19:11 wp-feed.php
drwxr-xr-x 77 TAmoyal TAmoyal 2618 Jul 17 16:29 wp-includes/
-rw-r--r-- 1 TAmoyal TAmoyal 1946 Jul 2 19:14 wp-links-opml.php
-rw-r--r-- 1 TAmoyal TAmoyal 2341 Jul 2 19:14 wp-load.php
-rw-r--r-- 1 TAmoyal TAmoyal 21019 Jul 2 19:14 wp-login.php
-rw-r--r-- 1 TAmoyal TAmoyal 7113 Jul 2 19:14 wp-mail.php
-rw-r--r-- 1 TAmoyal TAmoyal 487 Jul 2 19:14 wp-pass.php
-rw-r--r-- 1 TAmoyal TAmoyal 218 Jul 2 19:14 wp-rdf.php
-rw-r--r-- 1 TAmoyal TAmoyal 316 Jul 2 19:14 wp-register.php
-rw-r--r-- 1 TAmoyal TAmoyal 218 Jul 2 19:14 wp-rss.php
-rw-r--r-- 1 TAmoyal TAmoyal 220 Jul 2 19:14 wp-rss2.php
-rw-r--r-- 1 TAmoyal TAmoyal 21213 Jul 2 19:14 wp-settings.php
-rw-r--r-- 1 TAmoyal TAmoyal 3434 Jul 2 19:14 wp-trackbac
Thanks
You might want to double-check the permissions. All folders should have a+x and all files should have a+r. If that is the case, check to see if there are any symbolic links in there. Depending on your Apache configuration, symbolic links might not be allowed. You can use the "SymLinksIfOwnerMatch" (more secure) or "FollowSymLinks" (less secure) options in your Apache configuration to enable symbolic links.