sql
stringlengths
6
1.05M
<filename>library/src/test/resources/find_top_users.sql SELECT * FROM users ORDER BY karma LIMIT 5
<reponame>luizgribeiro/airbyte {{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} -- SQL model to build a hash column based on the values of this record select *, {{ dbt_utils.surrogate_key([ '_AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID', ...
<gh_stars>1-10 USE adventureworks; -- the table -- columns SELECT * FROM Person.Person; -- only the columns we want SeLeCt FirstName, LastName from Person.Person; -- only the columns i want, only the rows i want SELECT FirstName, LastName FROM Person.Person WHERE LastName = 'Adams'; SELECT FirstName, ...
<filename>src/database/database.sql /** * SQL file * Schemas and most used querys for test database * */ CREATE TABLE Users ( id INT UNSIGNED AUTO_INCREMENT, name VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, email VARCHAR(50) NOT NULL, password VARCHAR(50) NOT NULL, createdAt t...
-- file:tstypes.sql ln:57 expect:true SELECT E'1&(''2''&('' 4''&(\\|5 | ''6 \\'' !|&'')))'::tsquery
CREATE TABLE SIDECAR ( URL varchar NOT NULL PRIMARY KEY, PARENT_URL varchar NOT NULL, LAST_MODIFIED_TIME datetime NOT NULL, LIBRARY_ID varchar NOT NULL );
SET current refresh age 0; CREATE summary TABLE ?SCHEMA?.storesum as ( SELECT store, quarter, item, sum(sales) as total, count(*) as qty FROM ?SCHEMA?.transactions GROUP BY store, quarter, item ) data initially deferred refresh deferred not logged initially;
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50717 Source Host : 127.0.0.1:3306 Source Database : news Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2018-03-08 21:21:07 */ SET FOREIGN_KEY_CHE...
begin; select plan(<%- 18 + nonAdminRoles.length * 6 + 4%>); select has_table('<%- schemaName %>', '<%- userTable %>', 'table <%- schemaName %>.<%- userTable %> exists'); select has_column('<%- schemaName %>', '<%- userTable %>', 'id', 'table <%- schemaName %>.<%- userTable %> has id column'); select has_column('<%- s...
<filename>db/test/src/main/resources/create-db.sql<gh_stars>0 DROP TABLE IF EXISTS employee; DROP TABLE IF EXISTS department; CREATE TABLE department ( department_id int NOT NULL auto_increment, department_name varchar(50) NOT NULL UNIQUE, CONSTRAINT department_pk PRIMARY KEY (department_id) ); ...
/* Warnings: - You are about to drop the column `name` on the `Application` table. All the data in the column will be lost. - Added the required column `age` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationDRRegionStore...
<filename>scripts/get-q25-stat.sql<gh_stars>0 use tpcds_5000_parquet; drop table if exists tpcds_q25_groupcount; create table tpcds_q25_groupcount stored as parquet as select i_item_id ,i_item_desc ,s_store_id ,s_store_name, count(*) as groupsize from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ...
<reponame>vightel/FloodMapsWorkshop<filename>sql/public.sql /* Navicat Premium Data Transfer Source Server : AWS MENA Source Server Type : PostgreSQL Source Server Version : 90303 Source Host : osmdb.crcholi0be4z.us-east-1.rds.amazonaws.com Source Database : osmdb Source Schema ...
/* Copyright 2016 Georgia Institute of Technology Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable la...
<reponame>kostya-ten/iperon -- upgrade -- CREATE TABLE IF NOT EXISTS "url_short" ( "url_short_id" SERIAL NOT NULL PRIMARY KEY, "created_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, "expire_at" TIMESTAMPTZ NOT NULL, "shortened" VAR...
DROP VIEW IF EXISTS view_daftar_pengeluaran_paringintimur; CREATE VIEW view_daftar_pengeluaran_paringintimur AS SELECT * FROM view_daftar_pengeluaran_kabupaten WHERE 1 = 1 AND id_skpd = 30; GRANT ALL PRIVILEGES ON view_daftar_pengeluaran_paringintimur TO lap_paringintimur; REVOKE INSERT, UPDATE, DELETE ON view_da...
-- @testpoint:opengauss关键字tsfield(非保留),作为数据库名 --关键字不带引号-成功 drop database if exists tsfield; create database tsfield; drop database tsfield; --关键字带双引号-成功 drop database if exists "tsfield"; create database "tsfield"; drop database "tsfield"; --关键字带单引号-合理报错 drop database if exists 'tsfield'; create database 'tsfield';...
<reponame>Threepwoodd/janitor CREATE TABLE `SITE_DB`.`item_event_hosts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `host` varchar(255) DEFAULT NULL, `host_address1` varchar(255) DEFAULT NULL, `host_address2` varchar(255) DEFAULT NULL, `host_city` varchar(255) DEFAULT NULL, `host_postal` varchar(255) DEFAULT N...
create database db_rh; use db_rh; create table tb_funcionarios ( id bigint auto_increment, nomeFuncionario varchar(255), cargo varchar(255), setor varchar(255), salario double, primary key (id) ); select * from tb_funcionarios; select * from tb_funcionarios where salario > 2000; select * from tb_funcionarios where s...
CREATE USER 'exporter'@'%' IDENTIFIED BY 'password' WITH MAX_USER_CONNECTIONS 3; GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO 'exporter'@'%';
CREATE TABLE [dbo].[CachedSPByCPUCost]( [CachedSPByCPUCostId] INT IDENTITY(1,1) NOT NULL CONSTRAINT pkCachedSPByCPUCost PRIMARY KEY CLUSTERED, [ReportDate] DATETIME2 NOT NULL, [SP Name] [sysname] NOT NULL, [Total Worker Time] [bigint] NOT NULL, [Avg Worker Time] [bigint] NOT NULL, [Execution Co...
SELECT target_name, SUM(question_difference) as metric FROM magic WHERE source_user = 1 AND target_user <> 1 GROUP BY target_name ORDER BY metric LIMIT 1
<reponame>anuragjain343/Connekt_us -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Apr 13, 2019 at 09:35 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.0.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_...
ALTER TABLE games ADD network_level ENUM('LOCAL','REMOTE_WRITE','HYBRID','REMOTE') NOT NULL DEFAULT 'HYBRID' AFTER type;
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 01 Sep 2021 pada 06.01 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
<filename>db/migrate/000150_admin_notification_config.sql INSERT INTO `config` (`key`, `value`) VALUES ( 'notification-admin-is-enable', '1' ); INSERT INTO `config` (`key`, `value`) VALUES ( 'notification-admin-is-enable-takeout', '0' );
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <NAME> -- Read date: 22 Oct 2018 -- Description: Reads record(s) from the TD_MATRIX and TD_Release table -- ============================================= CREATE OR ALTER PROCEDURE Data_Matrix_ReadLanguage @...
<reponame>Shuttl-Tech/antlr_psql -- file:int8.sql ln:30 expect:true SELECT * FROM INT8_TBL WHERE q2 >= 4567890123456789
-- file:transactions.sql ln:196 expect:true SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE a.a=6 AND b.a=7
<reponame>raphaelchampeimont/aurora-rds-localdisk-benchmark -- Create the table which will receive test data DROP TABLE IF EXISTS benchmark; CREATE TABLE benchmark ( d1 double precision, d2 double precision, d3 double precision, d4 double precision, d5 double precision, s1 text, s2 text, ...
CREATE TABLE IF NOT EXISTS spring(idspring INT NOT NULL, host VARCHAR(25) NULL, port INT NULL, type VARCHAR(25) NULL, PRIMARY KEY(IDSPRING))
ALTER TABLE bacteria ADD COLUMN fk_sub_specie BIGINT; ALTER TABLE bacteria ADD CONSTRAINT fk_bacteria_sub_specie_specie FOREIGN KEY (fk_sub_specie) REFERENCES specie (id);
<reponame>MukulKolpe/almanac.httparchive.org<filename>sql/2019/third-parties/05_09.sql #standardSQL # Top 100 third party requests by request volume SELECT requestUrl, COUNT(0) AS totalRequests, SUM(requestBytes) AS totalBytes, ROUND(COUNT(0) * 100 / MAX(t2.totalRequestCount), 2) AS percentRequestCount FROM ( ...
<reponame>aemlima2019/DS_BDAemlima USE FIT_ALUNOS GO CREATE TABLE CLIENTE_C ( IDCLI INT NOT NULL IDENTITY (1,1) , NOMECLI VARCHAR(100) NOT NULL , TELEFONECLI VARCHAR(20) NOT NULL ,CONSTRAINT PKCLIEN PRIMARY KEY (IDCLI) ); CREATE TABLE PRODUTOS_P ( IDPROD INT NOT NULL IDENTITY (1,1) ,NOMEPROD VARCHAR (60) ,CONSTRAINT ...
{{ config( materialized = 'table', unique_key = 'event_guid' ) }} with int_events as ( select event_guid, user_guid, session_guid, page_url, NULLIF(split_part(page_url, '/', 5), '') as product_guid, event_type from {{ ref('stg_events') ...
/* Navicat Premium Data Transfer Source Server : 127.0.0.1 Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3306 Source Schema : yj Target Server Type : MySQL Target Server Version : 50721 File Encoding : 65001 Date: 17/04/2018 17:03:0...
-- -- Tigase Jabber/XMPP Server -- Copyright (C) 2004-2012 "<NAME>" <<EMAIL>> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by -- the Free Software Foundation, either version 3 of the License. -- -- This progr...
create or replace function mapping.get_code_system_id ( _code_system_identifier varchar(500) ) returns integer as $$ declare _code_system_id integer; begin if (trim(coalesce(_code_system_identifier, '')) = '') then _code_system_identifier = 'NO-CODE-SYSTEM'; end if; select code_system_id into _code_system...
ALTER TABLE action_items ADD COLUMN priority decimal;
alter table repository_statistic add column oosla_created_before datetime; alter table repository_statistic add column oosla_text_unit_count bigint default 0; alter table repository_statistic add column oosla_text_unit_word_count bigint default 0;
-- Deploy oak:seedTable_user to pg BEGIN; INSERT INTO public."user" (username, email, "password", avatar, role_id) VALUES ('aurelia'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '1'::integer), ('marina'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAm...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Máy chủ: localhost -- Thời gian đã tạo: Th10 27, 2019 lúc 05:14 AM -- Phiên bản máy phục vụ: 10.4.8-MariaDB -- Phiên bản PHP: 7.1.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
create table `roles` ( `id` INT unsigned not null AUTO_INCREMENT, `name` VARCHAR(20) not null, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; create t...
<filename>src/modules/database/prisma/migrations/20210928022854_initial/migration.sql -- CreateTable CREATE TABLE "User" ( "id" TEXT NOT NULL, "name" VARCHAR NOT NULL, "authId" INTEGER NOT NULL, "email" VARCHAR NOT NULL, "enabled" BOOLEAN NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRE...
<filename>ji-database/src/test/resources/querybuilder/derby/createView.sql CREATE TABLE table1 ( id INT, name VARCHAR(50) ); CREATE TABLE table2 ( id INT ); INSERT INTO table1 VALUES (1, 'name_1'); INSERT INTO table1 VALUES (2, 'name_2'); INSERT INTO table1 VALUES (3, 'name_3'); INSERT INTO table1 VALU...
DROP TABLE IF EXISTS students; CREATE TABLE students ( id INTEGER PRIMARY KEY AUTOINCREMENT, roll_No INTEGER NOT NULL, name VARCHAR(100) NOT NULL, math_Marks INTEGER NOT NULL, physics_Marks INTEGER NOT NULL, chemistry_Marks INTEGER NOT NULL, total_Marks INTEGER NOT NULL, percentage INTE...
SELECT name, id FROM rights WHERE name = :rightName
<filename>frontend-api-develop/internal/platform/db/migrations/20200527041012_create_overtime_weights_table.up.sql<gh_stars>0 create table if not exists overtime_weights( id serial primary key not null, created_at timestamp not null, updated_at timestamp not null, deleted_at timestamp, organization_...
with base_data as ( select * from data d join metadata m on d.meta_id=m.id where variable_id=1 ), mean_temperature as ( select base_data.id, avg(value) as t_avg from base_data group by base_data.id ), day_temperature as ( select base_data.id, avg(value) as t_day from base_data where date_part('hour', ...
<gh_stars>0 -- MySQL Script generated by MySQL Workbench -- Thu Sep 5 18:29:44 2019 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, ...
<reponame>reushftw/esther-esthetica -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : jeu. 27 juin 2019 à 18:27 -- Version du serveur : 5.7.19 -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET...
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64) -- -- Host: localhost Database: socialtruek_db3 -- ------------------------------------------------------ -- Server version 5.5.5-10.4.8-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACT...
CREATE TABLE [dbo].[Tags] ( [TagID] INT IDENTITY (1, 1) NOT NULL, [Tag] CHAR (25) NOT NULL, [TagDescription] CHAR (512) NOT NULL, [PriorityTag] BIT NOT NULL );
-- Procedure WebTemplate_Del SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[WebTemplate_Del] ( @Id int ) AS SET NOCOUNT ON if(@Id > 0) DELETE FROM WebTemplate WHERE Id=@Id RETURN GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO
INSERT INTO department ("name") VALUES ("Sales"); INSERT INTO department ("name") VALUES ("Legal"); INSERT INTO department ("name") VALUES ("Finance"); INSERT INTO roles (title, salary, department_id) VALUES ("Salesperson", 60000, 1), ("Paralegal", 80000, 2), ("Sales Manager", 120000, 1), ("Accountant", 100000, 3), ("...
/* Script: GeomIntersect.sql Purpose: Microsoft Transact SQL Script that calculate the intersection of two geometry objects. Two examples are provided here - one using variables, the other using an inner join from here: http://www.benjaminspaulding.com/2011/11/15/...
create table p1k1 as ( select p1.id as p1_id, k_person2id from person p1, knows where p1.p_personid = k_person1id ); create table fpf as ( select f_title, f_forumid, fp_personid, fp_joindate from forum f, forum_person fp where fp.fp_forumid = f.f_forumid ); create index p1k1_...
<gh_stars>1-10 DELETE FROM AD_Menu WHERE AD_Process_ID IN (540618, 540724); DELETE FROM AD_Scheduler WHERE AD_Process_ID IN (540618, 540724); DELETE FROM AD_Process WHERE AD_Process_ID IN (540618, 540724); DROP VIEW IF EXISTS "de.metas.fresh".X_MRP_ProductInfo_AttributeVal_Raw_V; DROP VIEW IF EXISTS X_MRP_ProductInfo...
-- 2017-05-20T12:00:11.930 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543344,0,'AD_Role_Included_ID',TO_TIMESTAMP('2017-05-20 12:00:11','YYYY-M...
create table if not exists markets ( quote_asset varchar(64), base_asset varchar(64), ticker varchar not null, primary key (quote_asset, base_asset) ); create table if not exists fills ( side varchar(4) not null, tx_id varchar(64) not null, height integer not nu...
<reponame>499453466/Lua-Other /* =============================== Title: The Harvest Festival Remove Author: Nexis Team: Sun++ (www.sunplusplus.info) Duration: Sept 8th - Sept 13th =============================== */ /* REMOVE CREATURE SPAWNS */ DELETE FROM `creature_spawns` WHERE `id` BETWEEN '400000' AND '400026'; /...
-- Create widgets. -- requires: users
alter table evt_feature_used add if not exists feature_alias varchar(255); update host set kind = 'other' where host.kind = 'corporate'
<reponame>radekg/kratos ALTER TABLE "sessions" ADD COLUMN "active" NUMERIC DEFAULT 'false';
/* create trigger - check if the identifier name includes a dot(.). */ create user u1; call login ('u1') on class db_user; create table u1.t1 (c1 int, c2 varchar, c3 datetime); create table u1.t2 (c1 int, c2 varchar, c3 datetime); create trigger u1.trig1 after insert on u1.t1 execute insert into t2 values (obj.c1, obj...
<filename>Database/flegigs_clean_database.sql -- phpMyAdmin SQL Dump -- version 4.4.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 15, 2019 at 11:47 AM -- Server version: 5.6.25 -- PHP Version: 5.6.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
INSERT IGNORE INTO category (description) VALUES ('North Indian'); INSERT IGNORE INTO category (description) VALUES ('South Indian'); INSERT IGNORE INTO category (description) VALUES ('East Indian'); INSERT IGNORE INTO category (description) VALUES ('West Indian'); INSERT IGNORE INTO category (description) VALUES ('Ame...
-- 1.6 between operator use sql_store; select * from customers where points between 1000 and 3000; -- exercise select * from customers where birth_date between '1990-1-1' and '2000-1-1';
SELECT PeakName,RiverName,LOWER(CONCAT(left(PeakName,LEN(PeakName)-1),RiverName)) AS Mix from Peaks, Rivers WHERE RIGHT(PeakName,1)=LEFT(RiverName,1) ORDER BY Mix
<gh_stars>10-100 -- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: salesforce; Type: SCHEMA; Schema: -; Owner: - -- CREATE SCHEMA sale...
<gh_stars>1-10  CREATE View uspgenerator.GeneratorUspStep_Persistence_IsInactive_setpoint As With ro_u As ( Select usp_id = u.id , u.usp_schema , u.usp_name , ro.is_persistence_check_duplicate_per_pk , ro.is_persistence_check_for_empty_source , ro.is_persiste...
-- file:tstypes.sql ln:219 expect:true SELECT * FROM unnest('base hidden rebel spaceship strike'::tsvector)
<filename>d365fo.tools/internal/sql/clear-azurebacpacdatabase.sql --Author: <NAME> (@ITRasmus) --Author: <NAME> (@dropshind) --Author: <NAME> (@skaue) --Prepare a database in Azure SQL Database for export to SQL Server. -- Re-assign full text catalogs to [dbo] BEGIN DECLARE @catalogName NVARCHAR(256); DECLARE ...
<reponame>jveyes/ReservaME DROP TABLE IF EXISTS `plugin_stripe`; CREATE TABLE IF NOT EXISTS `plugin_stripe` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `foreign_id` int(10) unsigned DEFAULT NULL, `stripe_id` varchar(255) DEFAULT NULL, `token` varchar(255) DEFAULT NULL, `amount` decimal(9,2) unsigne...
CREATE TABLE IF NOT EXISTS `#__rsform_condition_details` ( `id` int(11) NOT NULL AUTO_INCREMENT, `condition_id` int(11) NOT NULL, `component_id` int(11) NOT NULL, `operator` varchar(16) NOT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `condition_id` (`condition_id`), KEY `component_id` (...
<filename>db/ls20171205.sql /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50717 Source Host : localhost:3306 Source Database : ls Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-12-05 23:40:06 */ SET FORE...
<filename>sql/5_advanced_join/1_sqlprojectplanning.sql Solution to [SQL Project Planning](https://www.hackerrank.com/challenges/sql-projects/problem)
<gh_stars>1-10 DROP TABLE "TEST_SETTING"; DROP TABLE "TEST_LOGGER"; DROP TABLE "TEST_ROLE_CORE_INFO"; DROP TABLE "TEST_USER_CORE_INFO"; DROP TABLE "TEST_USER_ROLE_REF"; DROP TABLE "TEST_DEPARTMENT_CORE_INFO"; CREATE TABLE TEST_SETTING ( ID VARCHAR(50) NOT NULL, NAME VARCHAR(30) NOT NULL, VALUE VARCHAR(50) NOT NUL...
alter table EMAILTEMPLATES_EMAIL_TEMPLATE add ( EMAIL_BODY_REPORT_ID varchar2(32) ) ^ alter table EMAILTEMPLATES_EMAIL_TEMPLATE add ( HTML clob ) ^ alter table EMAILTEMPLATES_EMAIL_TEMPLATE add ( REPORT_XML clob ) ^
<filename>src/main/sql/CollaborativeFiltering/ItemBasedCF/Calculate_Item_Item_Similarity.sql insert into ITEM_ITEM_SIMILARITY with target_log_data as ( select * from SHOPPING_LOG where LOG_DATE >= '${CALCULATE_START_DATE}' ), user_purchased_item_cnt as ( select USER_ID, count(distinct ITEM_ID) CNT ...
ALTER TABLE `forms` CHANGE `sort_order` `sort_order` INT(11) NOT NULL DEFAULT '0';
CREATE INDEX author_addon_idx ON personas (author, addon_id);
-- @testpoint:opengauss关键字nologging(非保留),自定义数据类型名为explain --关键字explain作为数据类型不带引号,创建成功 drop type if exists nologging; CREATE TYPE nologging AS (f1 int, f2 text); select typname from pg_type where typname ='nologging'; drop type nologging; --关键字explain作为数据类型加双引号,创建成功 drop type if exists "nologging"; CREATE TYPE "nolog...
<filename>openGaussBase/testcase/KEYWORDS/Current_Path/Opengauss_Function_Keyword_Current_Path_Case0029.sql<gh_stars>0 -- @testpoint:opengauss关键字current_path(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists current_path; CREATE TABLESPACE current_path RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; --关键...
# # Lab 1 - DB Seed Script # use travelbuddy; DROP TABLE IF EXISTS `flightspecial`; CREATE TABLE `flightspecial` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `header` varchar(255) NOT NULL DEFAULT '', `body` varchar(255) DEFAULT NULL, `origin` varchar(255) DEFAULT NULL, `originCode` varchar(6) DEFAULT NU...
SELECT lastName, party, votes FROM ge WHERE constituency = 'S14000024' AND yr = 2017 ORDER BY votes DESC; SELECT party, votes, RANK() OVER (ORDER BY votes DESC) as posn FROM ge WHERE constituency = 'S14000024' AND yr = 2017 ORDER BY party; SELECT yr,party, votes, RANK() OVER (PARTITION BY yr ORDER BY votes DESC) as p...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 28 Bulan Mei 2020 pada 02.23 -- Versi server: 10.1.30-MariaDB -- Versi PHP: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2017-09-30',@EPS = N'0.29',@EPSDeduct = N'0',@Revenue = N'55.88亿',@RevenueYoy = N'25.27',@RevenueQoq = N'-',@Profit = N'3697.31万',@ProfitYoy = N'718.40',@ProfiltQoq = N'-',@NAVPerUnit = N'7.1102',@ROE = N'5.11',@CashPerUnit = N'-1.6815',@GrossProfitRate = N'1...
<reponame>HigorSnt/odbm<gh_stars>0 CREATE OR REPLACE PROCEDURE hello_world () AS BEGIN dbms_output.put_line('Hello World!'); END hello_world; CREATE PROCEDURE dashboard.insert_user (id IN NUMBER, user_name IN VARCHAR2) IS BEGIN INSERT INTO dashboard.user VALUES (id, user_name); END dashboard.insert_user; GRANT ...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 23, 2019 at 10:39 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
CREATE function RangeExecuteSuccess (@Uname nvarchar(20)) returns table as return select case when ExecUsedTime < 6 then ExecUsedTime when cast(ExecUsedTime/10 as int)*10 > 50 then 9999 else (cast(ExecUsedTime/10 as int)*10)+10 end as xRange, 1 as SuccessCount, 0 as ErrorCount from pla...
<reponame>rafasousa0321/exercicio -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 12-Nov-2020 às 10:19 -- Versão do servidor: 10.1.38-MariaDB -- versão do PHP: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_...
INSERT INTO categories ( name ) VALUES( 'Fruit' ); INSERT INTO categories ( name ) VALUES( 'Vegetable' ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Apple' , 'Its an apple!' , 1.0 , 1 ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Banana', '...
<filename>queries/stackoverflow/q16/e01c1f367c2f3fe1912a9b1a70190574c2f444d5.sql<gh_stars>0 SELECT COUNT(*) FROM site AS s, so_user AS u1, tag AS t1, tag_question AS tq1, question AS q1, badge AS b1, account AS acc WHERE s.site_id = u1.site_id AND s.site_id = b1.site_id AND s.site_id =...
<filename>db.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 27, 2020 at 05:59 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
<reponame>shafly96/rehabilitasi -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 23, 2018 at 07:38 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone...
-- phpMyAdmin SQL Dump -- version 4.0.10.14 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Nov 05, 2018 at 06:49 PM -- Server version: 5.5.52-cll -- PHP Version: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
{{ config(schema="test_normalization", tags=["nested-intermediate"]) }} -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select {{ quote('_AIRBYTE_PARTITION_HASHID') }}, cast(currency as {{ dbt_utils.type_string() }}) as currency, {{ quote('_AIRBYTE_EMITTED_AT') ...
--highest profit earning promos on the web create or replace function bestPromoWeb() returns TABLE(promo_sk int, profit_store decimal) language plpgsql as $$ begin return query select ws_promo_sk, sum(ws_net_profit) as posProfit from web_sales_history where ws_net_profit>0 and ws_promo_sk is not NULL...
INSERT INTO department(name) values ("Finance"),("Human Resources"),("IT"); INSERT INTO role(title,salary,department_id) values ("Accountant",40000,1),("Hiring Manager",50000,2), ("Programmer",45000,3); INSERT INTO employee(firstname,lastname,role_id) values ("Justin","Pinero",3), ("David","Gate",1),("Alex","Caruso...